TypeSafe Text Decisions API
Get TypeSafe Text Decisions data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Typesafe, pass parameters such as model, questions, state, and retrieve structured data including returned noul field, returned type field, returned model field, returned input tokens field, and returned output tokens field for application integration and result review, and integration reference.
- Selected price
- $0.042 / million input tokensPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
TypeSafe Text Decisions API
Prepare your request, then continue with your agent.
Pricing
$0.042 / million input tokens
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
- Provider
- API
- Pricing
On this page
Overview
TypeSafe Text and Image Decisions API
Retrieve text and Image Decisions with the TypeSafe API. Provide Idempotency-Key in header, model in body, state in body, questions in body. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | body: body |
| Selected implementation | typesafe · TypeSafe Text and Image Decisions |
| Billing | Follow the selected implementation pricing, billing unit, quantity and charge rules |
What You Can Build
- Application integration and result review: Keep the request context attached to available returned results.
- Integration reference: Use the selected request format and keep source identifiers with the returned result.
Documented Response Fields
| Field | Meaning |
|---|---|
answers.billing.noul |
Returned noul field |
answers.billing.type |
Returned type field |
model |
Returned model field |
usage.input_tokens |
Returned input tokens field |
usage.output_tokens |
Returned output tokens field |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the JSON body and supported fields shown in the request template.
- Check the HTTP response and business result before reading optional fields.
curl \
'https://api.openany.si/v1/agent-apis/typesafe/v1/systemone' \
-X POST \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: offline-typesafe-text-0001' \
--data-raw '{
"model": "jev-1.14.0",
"questions": {
"billing": {
"instructions": "Is this message about billing?",
"type": "noul"
}
},
"state": "I was charged twice. Please refund the extra charge."
}'
Request and Response Examples
The response illustration is a schema template, not a captured business response. Replace request placeholders and read actual returned values for your target resource.
Published TypeSafe Text and Image Decisions API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
typesafeCurrent TypeSafe Text and Image Decisions · POST · View API reference | $0.042 / million input tokens | 0 | —successP50— |
- Pricing
- $0.042
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 8. Price update time: not supplied.
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/typesafe/v1/systemone- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
Fields follow the saved API contract. Additional official reference fields are labelled separately when they are not included. Official API reference
With the long-context header, the official per-request and per-question limits are both 262k tokens. Without it, the defaults are 64k and 32k. The input-token price is unchanged.
assets is a field inside body, not a separate request location. For example: body.assets.{name}.data_base64. Box questions belong under body.questions.{name}.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
Authorization | Request headersheaders | string | Yes | Use an OpenAny API key. The TypeSafe credential is managed by OpenAny. |
Idempotency-Key | Request headersheaders | string | Yes | Required OpenAny idempotency key. Reuse it only for the same request; it is not forwarded to TypeSafe. minLength: 1 · maxLength: 128 |
model | JSON request bodybody | string | Yes | Name or alias of the model to use. Available names are returned by GET /v1/models. enum: "jev-1.14.0", "jev-1.13.0" Use a pinned model version from the allowed values; provider aliases are not enabled here. |
state | JSON request bodybody | string | object | array | Yes | The content all questions in this request refer to. |
questions | JSON request bodybody | object | Yes | Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers. minProperties: 1 Box requires Jev 1.14 and an image. Noul, Choice and Score can also use images. Nested fields and variants
Nested fields and variantsNoulA yes/no question or statement, answered with the probability of yes or true. Nested fields and variants
ChoiceA question that selects one option from the choices you define. Nested fields and variants
ScoreA question that assigns a score using an ordered rubric. Nested fields and variants
BoxA question that locates what its instructions describe in the request's image. Requests with box questions must send the header TypeSafe-Danger-Zone-Images: true. Nested fields and variants
|
TypeSafe-Danger-Zone-Images | Request headersheaders | string | No | Set to true to use assets or box questions. enum: "true" Required for images or Box. Send the string true; text-only requests may omit it. |
TypeSafe-Danger-Zone-Long-Context | Request headersheaders | string | No | Set to true to use long context. enum: "true" Send the string true for long context on Jev 1.14 or 1.13. Omit it for default limits. The input-token price is unchanged. |
assets | JSON request bodybody | object | No | Media assets keyed by an opaque placeholder (recommend a per-image UUID). Each placeholder, wherever it appears as or inside a string in state, question instructions, or criteria, is replaced with the asset. Image assets require a vision-language model. minProperties: 1 Images are nested inside the JSON request body. Each asset name maps to one image object. Nested fields and variants
Nested fields and variants
|
Required markers inside a nested object or variant apply when that object or variant is used.
Full provider request schema
Output parameters
Official response structure. Answers use the names and types of the submitted questions.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
model | JSON response bodyresponse | string | Yes | Name of the model that answered the questions. May differ from the alias supplied in the request. |
answers | JSON response bodyresponse | object | Yes | Answers keyed by the question names supplied in the request. Each answer's type matches its question's type. minProperties: 1 Nested fields and variants
Nested fields and variantsNoulThe probability of a yes answer or a true statement. Nested fields and variants
ChoiceThe selected choice, confidence, and probabilities for a choice question. Nested fields and variants
ScoreAn expected score with its rubric, confidence, and score-level probabilities. Nested fields and variants
BoxA located box with normalized edge coordinates and confidence. Nested fields and variants
|
usage | JSON response bodyresponse | object | Yes | Input and output token counts for this evaluation. Nested fields and variants
|
Full provider response schema
Provider error responses
Provider validation formats are shown for reference. OpenAny may return its own gateway error envelope.
HTTP 400
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
detail | JSON response bodyresponse | string | object | Yes | Explanation of the invalid request. String details and message fields are bounded, with shortened text ending with …. |
HTTP 422
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
detail | JSON response bodyresponse | array | No | Validation errors describing which request values are missing or invalid. Nested fields and variants
Nested fields and variants
|
Composite rule pricing
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.
| Fee item | Price | Metering source | When | Quantity limit |
|---|---|---|---|---|
| Billable input tokens | $0.042000 / million input tokens | Response · /usage/input_tokens · Numeric value | Always | 262144 token · Decimal places: 0 |
Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.011011.
Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.
Pricing parameters and defaults
[]
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation template · Offline contract illustration
Response illustration only. Placeholder values and unknown business fields are not recorded API results. Replace request placeholders before use.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 4
Review these request fields before running. Keep the published provider and request method unchanged.
Idempotency-Key- Required OpenAny idempotency key: 1–128 printable ASCII bytes, excluding spaces/control characters. Reuse only for the same request; this local contract is stricter than PageIndex's upstream 255-character limit.
body- JSON Base64 images, text and optional long context on pinned Jev 1.14/1.13. Box requires 1.14 and an image. Multipart and model aliases remain excluded. Long-context gateway adaptation and target acceptance pending.
TypeSafe-Danger-Zone-Images- Experimental images opt-in. Required when assets is nonempty or a Box question is used; optional for text-only requests. Gateway adaptation confirmed by user; target runtime enforcement not independently verified.
TypeSafe-Danger-Zone-Long-Context- Optional long-context opt-in for pinned Jev 1.14.0 and 1.13.0. Send the STRING true to use the official 262k per-request and per-question limits. Omit for default 64k per-request/32k per-question. Same input-token price; output free. This header may accompany the Images header. Gateway long-context acceptance pending.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/typesafe/v1/systemone' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: offline-typesafe-text-0001' \ --data-raw '{ "model": "jev-1.14.0", "questions": { "billing": { "instructions": "Is this message about billing?", "type": "noul" } }, "state": "I was charged twice. Please refund the extra charge." }'Check the response
Response template · not a real response · Documented HTTP 200
Response template · not a real response{ "answers": { "billing": { "noul": 0.98, "type": "noul" } }, "model": "jev-1.14.0", "usage": { "input_tokens": 120, "output_tokens": 12 } }