TypeSafe Text Decisions
Retrieve text and Image Decisions with the TypeSafe API. The request takes a model, a questions and a state. Use it in visual discovery or a media workflow.
- Selected price
- $0.042 / million input tokensPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
TypeSafe Text Decisions
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
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
modelstringName of the model that answered the questions. May differ from the alias supplied in the request.
answersobjectAnswers keyed by the question names supplied in the request. Each answer's type matches its question's type.
[key]objecttype"noul"Identifies a yes/no answer.
noulnumberProbability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.
type"choice"Identifies a selection from the requested choices.
choicestringThe name of the choice with the highest probability among the question's criteria.
confidencenumberConfidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.
probabilitiesobjectProbability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.
[key]number
type"score"Identifies a rating against the requested score levels.
scorenumberExpected score: the probability-weighted average of the rubric levels. May fall between integer levels.
confidencenumberConfidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.
legendobjectThe requested criteria mapped to their score levels, so you can interpret the score.
[key]string | object | unknown[]
probabilitiesobjectProbability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.
[key]number
type"box"Identifies a box answer.
boxobjectThe box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position.
topnumberTop edge of the box, as a fraction of image height from the top (0-1).
bottomnumberBottom edge of the box, as a fraction of image height from the top (0-1).
leftnumberLeft edge of the box, as a fraction of image width from the left (0-1).
rightnumberRight edge of the box, as a fraction of image width from the left (0-1).
confidencenumber | nullConfidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.
usageobjectInput and output token counts for this evaluation.
input_tokensintegerNumber of billable input tokens used to evaluate the request.
output_tokensintegerNumber of output tokens used to answer the questions. Output tokens are currently free of charge.
// Based on the provider documentation response definition.
export type ApiResponse = {
/** Name of the model that answered the questions. May differ from the alias supplied in the request. */
model: string;
/** Answers keyed by the question names supplied in the request. Each answer's type matches its question's type. */
answers: Record<string, {
/** Identifies a yes/no answer. */
type: "noul";
/** Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty. */
noul: number;
} | {
/** Identifies a selection from the requested choices. */
type: "choice";
/** The name of the choice with the highest probability among the question's criteria. */
choice: string;
/** Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review. */
confidence: number;
/** Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1. */
probabilities: Record<string, number>;
} | {
/** Identifies a rating against the requested score levels. */
type: "score";
/** Expected score: the probability-weighted average of the rubric levels. May fall between integer levels. */
score: number;
/** Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review. */
confidence: number;
/** The requested criteria mapped to their score levels, so you can interpret the score. */
legend: Record<string, string | Record<string, unknown> | Array<unknown>>;
/** Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1. */
probabilities: Record<string, number>;
} | {
/** Identifies a box answer. */
type: "box";
/** The box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position. */
box: {
/** Top edge of the box, as a fraction of image height from the top (0-1). */
top: number;
/** Bottom edge of the box, as a fraction of image height from the top (0-1). */
bottom: number;
/** Left edge of the box, as a fraction of image width from the left (0-1). */
left: number;
/** Right edge of the box, as a fraction of image width from the left (0-1). */
right: number;
};
/** Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence. */
confidence: number | null;
}>;
/** Input and output token counts for this evaluation. */
usage: {
/** Number of billable input tokens used to evaluate the request. */
input_tokens: number;
/** Number of output tokens used to answer the questions. Output tokens are currently free of charge. */
output_tokens: number;
};
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
typesafeCurrent TypeSafe Text and Image Decisions · POST · View API reference | $0.042 / million input tokens | — | —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: 7. 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
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."
}'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 |
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. |
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
|
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
{
"properties": {
"model": {
"type": "string",
"title": "Model",
"description": "Name or alias of the model to use. Available names are returned by GET /v1/models.",
"examples": [
"jev-latest"
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array",
"title": "State",
"description": "The content all questions in this request refer to.",
"examples": [
"I was charged twice. Please help.",
{
"message": "Please help.",
"subject": "Duplicate charge"
}
]
},
"questions": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"const": "noul",
"title": "Type",
"description": "Identifies a yes/no question or statement.",
"examples": [
"noul"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "The yes/no question or statement to evaluate.",
"examples": [
"Is this message spam?",
"This message contains unsolicited advertising.",
{
"task": "Identify unsolicited advertising."
}
]
},
"criteria": {
"anyOf": [
{
"properties": {
"true": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "True",
"description": "What counts as a yes answer.",
"examples": [
"The message is unsolicited advertising."
]
},
"false": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "False",
"description": "What counts as a no answer.",
"examples": [
"The message is a legitimate conversation."
]
}
},
"type": "object",
"title": "NoulCriteria",
"description": "Criteria defining what counts as a yes or no answer."
},
{
"type": "null"
}
],
"description": "Criteria clarifying what counts as a yes or no answer.",
"examples": [
{
"false": "A legitimate conversation",
"true": "Unsolicited advertising"
}
]
}
},
"type": "object",
"required": [
"type"
],
"title": "Noul",
"description": "A yes/no question or statement, answered with the probability of yes or true."
},
{
"properties": {
"type": {
"type": "string",
"const": "choice",
"title": "Type",
"description": "Identifies a question that selects one of the choices in criteria.",
"examples": [
"choice"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What the model should decide when choosing an option.",
"examples": [
"What is the tone of this message?"
]
},
"criteria": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array"
},
"type": "object",
"minProperties": 1,
"maxProperties": 255,
"title": "Criteria",
"description": "Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.",
"examples": [
{
"angry": "An upset or hostile message",
"calm": "A neutral or polite message",
"excited": "An enthusiastic or eager message"
}
]
}
},
"type": "object",
"required": [
"type",
"criteria"
],
"title": "Choice",
"description": "A question that selects one option from the choices you define."
},
{
"properties": {
"type": {
"type": "string",
"const": "score",
"title": "Type",
"description": "Identifies a question that rates the content using the levels in criteria.",
"examples": [
"score"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What the model should rate.",
"examples": [
"How urgent is this message?"
]
},
"criteria": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array"
},
"type": "array",
"minItems": 1,
"maxItems": 10,
"title": "Criteria",
"description": "Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.",
"examples": [
[
"Can wait",
"Needs attention this week",
"Needs attention today"
]
]
}
},
"type": "object",
"required": [
"type",
"criteria"
],
"title": "Score",
"description": "A question that assigns a score using an ordered rubric."
},
{
"properties": {
"type": {
"type": "string",
"const": "box",
"title": "Type",
"description": "Identifies a box question."
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What to locate in the image."
}
},
"type": "object",
"required": [
"type"
],
"title": "Box",
"description": "A 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."
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"noul": "#/components/schemas/NoulQuestion",
"choice": "#/components/schemas/ChoiceQuestion",
"score": "#/components/schemas/ScoreQuestion",
"box": "#/components/schemas/BoxQuestion"
}
},
"description": "A question about the supplied content."
},
"type": "object",
"minProperties": 1,
"title": "Questions",
"description": "Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.",
"examples": [
{
"billing": {
"instructions": "Is this message about billing?",
"type": "noul"
}
}
]
},
"assets": {
"additionalProperties": {
"properties": {
"type": {
"type": "string",
"const": "image",
"title": "Type",
"description": "Identifies an image asset."
},
"format": {
"type": "string",
"enum": [
"png",
"jpg",
"jpeg"
],
"title": "Format",
"description": "The image format, required with data_base64. The actual format is detected from the bytes."
},
"data_base64": {
"type": "string",
"title": "Data Base64",
"description": "Base64-encoded image data."
},
"part": {
"type": "string",
"title": "Part",
"description": "In a multipart request, the name of the image part this asset uses. With part, data_base64 is ignored."
}
},
"type": "object",
"title": "Asset",
"description": "An image that replaces its placeholder: its bytes in data_base64 with their format, or, in a multipart request, the name of the image part that holds them. Requests with images must send the header TypeSafe-Danger-Zone-Images: true."
},
"type": "object",
"minProperties": 1,
"title": "Assets",
"description": "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."
}
},
"type": "object",
"required": [
"model",
"state",
"questions"
],
"title": "SystemOneRequest",
"description": "Content and named questions to evaluate together using a TypeSafe model."
}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
{
"properties": {
"model": {
"type": "string",
"title": "Model",
"description": "Name of the model that answered the questions. May differ from the alias supplied in the request.",
"examples": [
"jev-latest"
]
},
"answers": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"const": "noul",
"title": "Type",
"description": "Identifies a yes/no answer.",
"examples": [
"noul"
]
},
"noul": {
"type": "number",
"title": "Noul",
"description": "Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.",
"examples": [
0.98
]
}
},
"type": "object",
"required": [
"type",
"noul"
],
"title": "Noul",
"description": "The probability of a yes answer or a true statement."
},
{
"properties": {
"type": {
"type": "string",
"const": "choice",
"title": "Type",
"description": "Identifies a selection from the requested choices.",
"examples": [
"choice"
]
},
"choice": {
"type": "string",
"title": "Choice",
"description": "The name of the choice with the highest probability among the question's criteria.",
"examples": [
"angry"
]
},
"confidence": {
"type": "number",
"title": "Confidence",
"description": "Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.",
"examples": [
0.9
]
},
"probabilities": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Probabilities",
"description": "Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.",
"examples": [
{
"angry": 0.8,
"calm": 0.1,
"excited": 0.1
}
]
}
},
"type": "object",
"required": [
"type",
"choice",
"confidence",
"probabilities"
],
"title": "Choice",
"description": "The selected choice, confidence, and probabilities for a choice question."
},
{
"properties": {
"type": {
"type": "string",
"const": "score",
"title": "Type",
"description": "Identifies a rating against the requested score levels.",
"examples": [
"score"
]
},
"score": {
"type": "number",
"title": "Score",
"description": "Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.",
"examples": [
1.7
]
},
"confidence": {
"type": "number",
"title": "Confidence",
"description": "Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.",
"examples": [
0.9
]
},
"legend": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array"
},
"type": "object",
"title": "Legend",
"description": "The requested criteria mapped to their score levels, so you can interpret the score.",
"examples": [
{
"0": "Can wait",
"1": "Needs attention this week",
"2": "Needs attention today"
}
]
},
"probabilities": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Probabilities",
"description": "Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.",
"examples": [
{
"0": 0.1,
"1": 0.1,
"2": 0.8
}
]
}
},
"type": "object",
"required": [
"type",
"score",
"confidence",
"legend",
"probabilities"
],
"title": "Score",
"description": "An expected score with its rubric, confidence, and score-level probabilities."
},
{
"properties": {
"type": {
"type": "string",
"const": "box",
"title": "Type",
"description": "Identifies a box answer.",
"examples": [
"box"
]
},
"box": {
"properties": {
"top": {
"type": "number",
"title": "Top",
"description": "Top edge of the box, as a fraction of image height from the top (0-1).",
"examples": [
0.2
]
},
"bottom": {
"type": "number",
"title": "Bottom",
"description": "Bottom edge of the box, as a fraction of image height from the top (0-1).",
"examples": [
0.66
]
},
"left": {
"type": "number",
"title": "Left",
"description": "Left edge of the box, as a fraction of image width from the left (0-1).",
"examples": [
0.19
]
},
"right": {
"type": "number",
"title": "Right",
"description": "Right edge of the box, as a fraction of image width from the left (0-1).",
"examples": [
0.68
]
}
},
"type": "object",
"required": [
"top",
"bottom",
"left",
"right"
],
"title": "BoxCoordinates",
"description": "The box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position.",
"examples": [
{
"bottom": 0.66,
"left": 0.19,
"right": 0.68,
"top": 0.2
}
]
},
"confidence": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Confidence",
"description": "Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.",
"examples": [
null,
0.9
]
}
},
"type": "object",
"required": [
"type",
"box",
"confidence"
],
"title": "Box",
"description": "A located box with normalized edge coordinates and confidence."
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"noul": "#/components/schemas/NoulAnswer",
"choice": "#/components/schemas/ChoiceAnswer",
"score": "#/components/schemas/ScoreAnswer",
"box": "#/components/schemas/BoxAnswer"
}
},
"description": "An answer whose type matches the corresponding question."
},
"type": "object",
"minProperties": 1,
"title": "Answers",
"description": "Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.",
"examples": [
{
"billing": {
"noul": 0.98,
"type": "noul"
}
}
]
},
"usage": {
"properties": {
"input_tokens": {
"type": "integer",
"title": "Input Tokens",
"description": "Number of billable input tokens used to evaluate the request.",
"examples": [
120
]
},
"output_tokens": {
"type": "integer",
"title": "Output Tokens",
"description": "Number of output tokens used to answer the questions. Output tokens are currently free of charge.",
"examples": [
12
]
}
},
"type": "object",
"required": [
"input_tokens",
"output_tokens"
],
"title": "Usage",
"description": "Input and output token counts for this evaluation.",
"examples": [
{
"input_tokens": 120,
"output_tokens": 12
}
]
}
},
"type": "object",
"required": [
"model",
"answers",
"usage"
],
"title": "SystemOneResponse",
"description": "Answers grouped by question name, with the model used and token usage."
}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
|
Sample response
Response template · not a real response · Documented HTTP 200 Response illustration only. Placeholder values and unknown business fields are not recorded API results. Replace request placeholders before use.
{
"answers": {
"billing": {
"noul": 0.98,
"type": "noul"
}
},
"model": "jev-1.14.0",
"usage": {
"input_tokens": 120,
"output_tokens": 12
}
}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.
View API Markdown
# TypeSafe Text Decisions
Retrieve text and Image Decisions with the TypeSafe API. The request takes a model, a questions and a state. Use it in visual discovery or a media workflow.
## Available implementations
typesafe · TypeSafe Text and Image Decisions: https://openany.si/markets/apis/capabilities/typesafe-text-decisions?offering=c31f8934-cb1a-47b0-87c0-b1c9f2c34755 · $0.042 / million input tokens
## Selected API contract
Documentation: https://openany.si/apis/c31f8934-cb1a-47b0-87c0-b1c9f2c34755
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/typesafe/v1/systemone
Price: $0.042 / million input tokens
Provider: typesafe
Contract revision: 7
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
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."
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "TypeSafe Text and Image Decisions",
"endpoint": "https://api.openany.si/v1/agent-apis/typesafe/v1/systemone",
"method": "POST",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "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.",
"location": "header",
"max_length": 128,
"min_length": 1,
"name": "Idempotency-Key",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "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.",
"json_schema": {
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"model": {
"const": "jev-1.13.0"
}
},
"required": [
"model"
]
},
"then": {
"properties": {
"questions": {
"additionalProperties": {
"properties": {
"type": {
"enum": [
"noul",
"choice",
"score"
]
}
}
}
}
}
}
},
{
"if": {
"not": {
"required": [
"assets"
]
}
},
"then": {
"properties": {
"questions": {
"additionalProperties": {
"properties": {
"type": {
"enum": [
"noul",
"choice",
"score"
]
}
}
}
}
}
}
},
{
"if": {
"properties": {
"assets": {
"maxProperties": 0
}
},
"required": [
"assets"
]
},
"then": {
"properties": {
"questions": {
"additionalProperties": {
"properties": {
"type": {
"enum": [
"noul",
"choice",
"score"
]
}
}
}
}
}
}
}
],
"description": "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.",
"properties": {
"assets": {
"additionalProperties": {
"additionalProperties": false,
"description": "PNG/JPEG image encoded in JSON. format and data_base64 are required; optional type must be image. Multipart part is unavailable in this profile.",
"properties": {
"data_base64": {
"description": "Standard padded Base64, without whitespace or a data: prefix. Decoded PNG/JPEG at most 16 MiB; image validation is required in the gateway.",
"maxLength": 22369624,
"minLength": 4,
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"title": "Data Base64",
"type": "string"
},
"format": {
"description": "The image format, required with data_base64. The actual format is detected from the bytes.",
"enum": [
"png",
"jpg",
"jpeg"
],
"title": "Format",
"type": "string"
},
"type": {
"const": "image",
"description": "Identifies an image asset.",
"title": "Type",
"type": "string"
}
},
"required": [
"format",
"data_base64"
],
"type": "object"
},
"description": "Images keyed by nonblank references used in string VALUES of state, instructions or criteria. Reference byte limits, matching and image/expanded-size checks require the gateway. Send TypeSafe-Danger-Zone-Images: true when using assets or Box.",
"minProperties": 1,
"propertyNames": {
"maxLength": 1024,
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"title": "Assets",
"type": "object"
},
"model": {
"description": "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"
],
"examples": [
"jev-latest"
],
"title": "Model",
"type": "string"
},
"questions": {
"additionalProperties": {
"description": "A question about the supplied content.",
"discriminator": {
"mapping": {
"box": "#/components/schemas/BoxQuestion",
"choice": "#/components/schemas/ChoiceQuestion",
"noul": "#/components/schemas/NoulQuestion",
"score": "#/components/schemas/ScoreQuestion"
},
"propertyName": "type"
},
"oneOf": [
{
"additionalProperties": false,
"description": "A yes/no question or statement, answered with the probability of yes or true.",
"properties": {
"criteria": {
"anyOf": [
{
"description": "Criteria defining what counts as a yes or no answer.",
"properties": {
"false": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "What counts as a no answer.",
"examples": [
"The message is a legitimate conversation."
],
"title": "False",
"x-accepts": "string | object | array"
},
"true": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "What counts as a yes answer.",
"examples": [
"The message is unsolicited advertising."
],
"title": "True",
"x-accepts": "string | object | array"
}
},
"title": "NoulCriteria",
"type": "object"
},
{
"type": "null"
}
],
"description": "Criteria clarifying what counts as a yes or no answer.",
"examples": [
{
"false": "A legitimate conversation",
"true": "Unsolicited advertising"
}
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "The yes/no question or statement to evaluate.",
"examples": [
"Is this message spam?",
"This message contains unsolicited advertising.",
{
"task": "Identify unsolicited advertising."
}
],
"title": "Instructions",
"x-accepts": "string | object | array"
},
"type": {
"const": "noul",
"description": "Identifies a yes/no question or statement.",
"examples": [
"noul"
],
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "Noul",
"type": "object"
},
{
"additionalProperties": false,
"description": "A question that selects one option from the choices you define.",
"properties": {
"criteria": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array"
},
"description": "Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.",
"examples": [
{
"angry": "An upset or hostile message",
"calm": "A neutral or polite message",
"excited": "An enthusiastic or eager message"
}
],
"maxProperties": 255,
"minProperties": 1,
"title": "Criteria",
"type": "object"
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "What the model should decide when choosing an option.",
"examples": [
"What is the tone of this message?"
],
"title": "Instructions",
"x-accepts": "string | object | array"
},
"type": {
"const": "choice",
"description": "Identifies a question that selects one of the choices in criteria.",
"examples": [
"choice"
],
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"criteria"
],
"title": "Choice",
"type": "object"
},
{
"additionalProperties": false,
"description": "A question that assigns a score using an ordered rubric.",
"properties": {
"criteria": {
"description": "Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.",
"examples": [
[
"Can wait",
"Needs attention this week",
"Needs attention today"
]
],
"items": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array"
},
"maxItems": 10,
"minItems": 1,
"title": "Criteria",
"type": "array"
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "What the model should rate.",
"examples": [
"How urgent is this message?"
],
"title": "Instructions",
"x-accepts": "string | object | array"
},
"type": {
"const": "score",
"description": "Identifies a question that rates the content using the levels in criteria.",
"examples": [
"score"
],
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"criteria"
],
"title": "Score",
"type": "object"
},
{
"additionalProperties": false,
"description": "A 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.",
"properties": {
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"description": "What to locate in the image.",
"title": "Instructions",
"x-accepts": "string | object | array"
},
"type": {
"const": "box",
"description": "Identifies a box question.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "Box",
"type": "object"
}
]
},
"description": "Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.",
"examples": [
{
"billing": {
"instructions": "Is this message about billing?",
"type": "noul"
}
}
],
"minProperties": 1,
"title": "Questions",
"type": "object"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"description": "The content all questions in this request refer to.",
"examples": [
"I was charged twice. Please help.",
{
"message": "Please help.",
"subject": "Duplicate charge"
}
],
"title": "State",
"x-accepts": "string | object | array"
}
},
"required": [
"model",
"state",
"questions"
],
"title": "SystemOneRequest",
"type": "object",
"x-openany-profile": "typesafe-json-base64-box-long-context-v2"
},
"location": "body",
"name": "body",
"nullable": false,
"pointer": "",
"required": true,
"type": "object"
},
{
"description": "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.",
"enum_values": [
"true"
],
"location": "header",
"name": "TypeSafe-Danger-Zone-Images",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "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.",
"enum_values": [
"true"
],
"location": "header",
"name": "TypeSafe-Danger-Zone-Long-Context",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "rules",
"parameters": [],
"policy_version": 2,
"sale": {
"addons": [],
"base_price_micro_usd": "0",
"max_cost_micro_usd": "11011",
"quantities": [
{
"id": "measured_usage",
"label": "Billable input tokens",
"max_quantity": "262144",
"measure": "value",
"pointer": "/usage/input_tokens",
"price_micro_usd": "42000",
"quantity_scale": 0,
"source": "response",
"unit": "token",
"unit_quantity": "1000000"
}
],
"rounding": "ceil",
"variants": []
}
},
"examples": [
{
"http_status": 200,
"name": "Documentation template · Offline contract illustration",
"request": {
"body": {
"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."
},
"headers": {
"Idempotency-Key": "offline-typesafe-text-0001"
},
"path": {},
"query": {}
},
"response_body": {
"answers": {
"billing": {
"noul": 0.98,
"type": "noul"
}
},
"model": "jev-1.14.0",
"usage": {
"input_tokens": 120,
"output_tokens": 12
}
}
},
{
"http_status": 200,
"name": "Documentation template · TypeSafe Image-Noul — offline contract",
"request": {
"body": {
"assets": {
"offline-image-280x280": {
"data_base64": "iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAIAAAAI7H7bAAADH0lEQVR4nO3TQQkAMAzAwPo3vYloYDDuFOSTOcDavA6AHxgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCgJEgYCQIGAkCRoKAkSBgJAgYCQJGgoCRIGAkCBgJAkaCwAVHyV7eA9YY1wAAAABJRU5ErkJggg==",
"format": "png",
"type": "image"
}
},
"model": "jev-1.14.0",
"questions": {
"visible": {
"instructions": "Is the image a plain white square?",
"type": "noul"
}
},
"state": {
"photo": "offline-image-280x280"
}
},
"headers": {
"Idempotency-Key": "offline-typesafe-image-noul-0001",
"TypeSafe-Danger-Zone-Images": "true"
},
"path": {},
"query": {}
},
"response_body": {
"answers": {
"visible": {
"noul": 0.98,
"type": "noul"
}
},
"model": "jev-1.14.0",
"usage": {
"input_tokens": 10000,
"output_tokens": 12
}
}
}
],
"provider_reference": {
"documentation_only": true,
"source_urls": [
"https://docs.typesafe.ai/api/system-one",
"https://api.typesafe.ai/openapi.json",
"https://docs.typesafe.ai/images",
"https://docs.typesafe.ai/primitives/box",
"https://docs.typesafe.ai/models"
],
"request_schema": {
"properties": {
"model": {
"type": "string",
"title": "Model",
"description": "Name or alias of the model to use. Available names are returned by GET /v1/models.",
"examples": [
"jev-latest"
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array",
"title": "State",
"description": "The content all questions in this request refer to.",
"examples": [
"I was charged twice. Please help.",
{
"message": "Please help.",
"subject": "Duplicate charge"
}
]
},
"questions": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"const": "noul",
"title": "Type",
"description": "Identifies a yes/no question or statement.",
"examples": [
"noul"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "The yes/no question or statement to evaluate.",
"examples": [
"Is this message spam?",
"This message contains unsolicited advertising.",
{
"task": "Identify unsolicited advertising."
}
]
},
"criteria": {
"anyOf": [
{
"properties": {
"true": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "True",
"description": "What counts as a yes answer.",
"examples": [
"The message is unsolicited advertising."
]
},
"false": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "False",
"description": "What counts as a no answer.",
"examples": [
"The message is a legitimate conversation."
]
}
},
"type": "object",
"title": "NoulCriteria",
"description": "Criteria defining what counts as a yes or no answer."
},
{
"type": "null"
}
],
"description": "Criteria clarifying what counts as a yes or no answer.",
"examples": [
{
"false": "A legitimate conversation",
"true": "Unsolicited advertising"
}
]
}
},
"type": "object",
"required": [
"type"
],
"title": "Noul",
"description": "A yes/no question or statement, answered with the probability of yes or true."
},
{
"properties": {
"type": {
"type": "string",
"const": "choice",
"title": "Type",
"description": "Identifies a question that selects one of the choices in criteria.",
"examples": [
"choice"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What the model should decide when choosing an option.",
"examples": [
"What is the tone of this message?"
]
},
"criteria": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array"
},
"type": "object",
"minProperties": 1,
"maxProperties": 255,
"title": "Criteria",
"description": "Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.",
"examples": [
{
"angry": "An upset or hostile message",
"calm": "A neutral or polite message",
"excited": "An enthusiastic or eager message"
}
]
}
},
"type": "object",
"required": [
"type",
"criteria"
],
"title": "Choice",
"description": "A question that selects one option from the choices you define."
},
{
"properties": {
"type": {
"type": "string",
"const": "score",
"title": "Type",
"description": "Identifies a question that rates the content using the levels in criteria.",
"examples": [
"score"
]
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What the model should rate.",
"examples": [
"How urgent is this message?"
]
},
"criteria": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array"
},
"type": "array",
"minItems": 1,
"maxItems": 10,
"title": "Criteria",
"description": "Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.",
"examples": [
[
"Can wait",
"Needs attention this week",
"Needs attention today"
]
]
}
},
"type": "object",
"required": [
"type",
"criteria"
],
"title": "Score",
"description": "A question that assigns a score using an ordered rubric."
},
{
"properties": {
"type": {
"type": "string",
"const": "box",
"title": "Type",
"description": "Identifies a box question."
},
"instructions": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"x-accepts": "string | object | array",
"title": "Instructions",
"description": "What to locate in the image."
}
},
"type": "object",
"required": [
"type"
],
"title": "Box",
"description": "A 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."
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"noul": "#/components/schemas/NoulQuestion",
"choice": "#/components/schemas/ChoiceQuestion",
"score": "#/components/schemas/ScoreQuestion",
"box": "#/components/schemas/BoxQuestion"
}
},
"description": "A question about the supplied content."
},
"type": "object",
"minProperties": 1,
"title": "Questions",
"description": "Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.",
"examples": [
{
"billing": {
"instructions": "Is this message about billing?",
"type": "noul"
}
}
]
},
"assets": {
"additionalProperties": {
"properties": {
"type": {
"type": "string",
"const": "image",
"title": "Type",
"description": "Identifies an image asset."
},
"format": {
"type": "string",
"enum": [
"png",
"jpg",
"jpeg"
],
"title": "Format",
"description": "The image format, required with data_base64. The actual format is detected from the bytes."
},
"data_base64": {
"type": "string",
"title": "Data Base64",
"description": "Base64-encoded image data."
},
"part": {
"type": "string",
"title": "Part",
"description": "In a multipart request, the name of the image part this asset uses. With part, data_base64 is ignored."
}
},
"type": "object",
"title": "Asset",
"description": "An image that replaces its placeholder: its bytes in data_base64 with their format, or, in a multipart request, the name of the image part that holds them. Requests with images must send the header TypeSafe-Danger-Zone-Images: true."
},
"type": "object",
"minProperties": 1,
"title": "Assets",
"description": "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."
}
},
"type": "object",
"required": [
"model",
"state",
"questions"
],
"title": "SystemOneRequest",
"description": "Content and named questions to evaluate together using a TypeSafe model."
},
"response_schema": {
"properties": {
"model": {
"type": "string",
"title": "Model",
"description": "Name of the model that answered the questions. May differ from the alias supplied in the request.",
"examples": [
"jev-latest"
]
},
"answers": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"const": "noul",
"title": "Type",
"description": "Identifies a yes/no answer.",
"examples": [
"noul"
]
},
"noul": {
"type": "number",
"title": "Noul",
"description": "Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.",
"examples": [
0.98
]
}
},
"type": "object",
"required": [
"type",
"noul"
],
"title": "Noul",
"description": "The probability of a yes answer or a true statement."
},
{
"properties": {
"type": {
"type": "string",
"const": "choice",
"title": "Type",
"description": "Identifies a selection from the requested choices.",
"examples": [
"choice"
]
},
"choice": {
"type": "string",
"title": "Choice",
"description": "The name of the choice with the highest probability among the question's criteria.",
"examples": [
"angry"
]
},
"confidence": {
"type": "number",
"title": "Confidence",
"description": "Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.",
"examples": [
0.9
]
},
"probabilities": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Probabilities",
"description": "Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.",
"examples": [
{
"angry": 0.8,
"calm": 0.1,
"excited": 0.1
}
]
}
},
"type": "object",
"required": [
"type",
"choice",
"confidence",
"probabilities"
],
"title": "Choice",
"description": "The selected choice, confidence, and probabilities for a choice question."
},
{
"properties": {
"type": {
"type": "string",
"const": "score",
"title": "Type",
"description": "Identifies a rating against the requested score levels.",
"examples": [
"score"
]
},
"score": {
"type": "number",
"title": "Score",
"description": "Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.",
"examples": [
1.7
]
},
"confidence": {
"type": "number",
"title": "Confidence",
"description": "Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.",
"examples": [
0.9
]
},
"legend": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"x-accepts": "string | object | array"
},
"type": "object",
"title": "Legend",
"description": "The requested criteria mapped to their score levels, so you can interpret the score.",
"examples": [
{
"0": "Can wait",
"1": "Needs attention this week",
"2": "Needs attention today"
}
]
},
"probabilities": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Probabilities",
"description": "Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.",
"examples": [
{
"0": 0.1,
"1": 0.1,
"2": 0.8
}
]
}
},
"type": "object",
"required": [
"type",
"score",
"confidence",
"legend",
"probabilities"
],
"title": "Score",
"description": "An expected score with its rubric, confidence, and score-level probabilities."
},
{
"properties": {
"type": {
"type": "string",
"const": "box",
"title": "Type",
"description": "Identifies a box answer.",
"examples": [
"box"
]
},
"box": {
"properties": {
"top": {
"type": "number",
"title": "Top",
"description": "Top edge of the box, as a fraction of image height from the top (0-1).",
"examples": [
0.2
]
},
"bottom": {
"type": "number",
"title": "Bottom",
"description": "Bottom edge of the box, as a fraction of image height from the top (0-1).",
"examples": [
0.66
]
},
"left": {
"type": "number",
"title": "Left",
"description": "Left edge of the box, as a fraction of image width from the left (0-1).",
"examples": [
0.19
]
},
"right": {
"type": "number",
"title": "Right",
"description": "Right edge of the box, as a fraction of image width from the left (0-1).",
"examples": [
0.68
]
}
},
"type": "object",
"required": [
"top",
"bottom",
"left",
"right"
],
"title": "BoxCoordinates",
"description": "The box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position.",
"examples": [
{
"bottom": 0.66,
"left": 0.19,
"right": 0.68,
"top": 0.2
}
]
},
"confidence": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Confidence",
"description": "Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.",
"examples": [
null,
0.9
]
}
},
"type": "object",
"required": [
"type",
"box",
"confidence"
],
"title": "Box",
"description": "A located box with normalized edge coordinates and confidence."
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"noul": "#/components/schemas/NoulAnswer",
"choice": "#/components/schemas/ChoiceAnswer",
"score": "#/components/schemas/ScoreAnswer",
"box": "#/components/schemas/BoxAnswer"
}
},
"description": "An answer whose type matches the corresponding question."
},
"type": "object",
"minProperties": 1,
"title": "Answers",
"description": "Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.",
"examples": [
{
"billing": {
"noul": 0.98,
"type": "noul"
}
}
]
},
"usage": {
"properties": {
"input_tokens": {
"type": "integer",
"title": "Input Tokens",
"description": "Number of billable input tokens used to evaluate the request.",
"examples": [
120
]
},
"output_tokens": {
"type": "integer",
"title": "Output Tokens",
"description": "Number of output tokens used to answer the questions. Output tokens are currently free of charge.",
"examples": [
12
]
}
},
"type": "object",
"required": [
"input_tokens",
"output_tokens"
],
"title": "Usage",
"description": "Input and output token counts for this evaluation.",
"examples": [
{
"input_tokens": 120,
"output_tokens": 12
}
]
}
},
"type": "object",
"required": [
"model",
"answers",
"usage"
],
"title": "SystemOneResponse",
"description": "Answers grouped by question name, with the model used and token usage."
},
"headers": [
{
"name": "TypeSafe-Danger-Zone-Images",
"in": "header",
"description": "Set to true to use assets or box questions.",
"schema": {
"type": "string",
"enum": [
"true"
]
},
"example": "true"
},
{
"name": "TypeSafe-Danger-Zone-Long-Context",
"in": "header",
"description": "Set to true to use long context.",
"schema": {
"type": "string",
"enum": [
"true"
]
},
"example": "true"
}
],
"error_responses": {
"400": {
"type": "object",
"title": "HTTPBadRequestError",
"required": [
"detail"
],
"description": "Application validation failures returned with HTTP status 400.",
"properties": {
"detail": {
"title": "Detail",
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "Explanation of the invalid request. String details and message fields are bounded, with shortened text ending with …."
}
}
},
"422": {
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location",
"description": "Path to the invalid value: the request location followed by field names and array indices. May be empty.",
"examples": [
[
"body",
"questions",
"urgency",
"score",
"criteria"
]
]
},
"msg": {
"type": "string",
"title": "Message",
"description": "Human-readable explanation of the validation failure. May be shortened with ….",
"examples": [
"Field required"
]
},
"type": {
"type": "string",
"title": "Error Type",
"description": "Machine-readable validation error code.",
"examples": [
"missing"
]
},
"input": {
"type": "string",
"title": "Input",
"description": "Text preview of the rejected input. May be shortened with ….",
"examples": [
"{\"type\":\"score\"}"
]
},
"ctx": {
"type": "object",
"title": "Context",
"description": "Additional context used to explain the validation failure. Entries may be omitted or shortened.",
"examples": [
{
"min_length": 1
}
]
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"description": "A request validation error at a specific field or array element."
},
"type": "array",
"title": "Detail",
"description": "Validation errors describing which request values are missing or invalid.",
"examples": [
[
{
"loc": [
"body",
"state"
],
"msg": "Field required",
"type": "missing"
}
]
]
}
},
"type": "object",
"title": "HTTPValidationError",
"description": "Request validation failures returned with HTTP status 422."
}
},
"supported_profile": {
"contentType": "application/json",
"models": [
"jev-1.14.0",
"jev-1.13.0"
],
"version": "typesafe-json-base64-box-long-context-v2",
"questionTypes": [
"noul",
"choice",
"score",
"box"
],
"imageEncoding": "base64",
"boxModels": [
"jev-1.14.0"
],
"unsupportedBodyFields": [],
"unsupportedAssetFields": [
"part"
],
"unsupportedQuestionTypes": [],
"unsupportedHeaders": [],
"runtimeStatus": "long_context_gateway_adaptation_pending",
"maxRequestBytes": 33554432,
"imageHeader": "TypeSafe-Danger-Zone-Images",
"inputNanoUsdPerToken": "42",
"outputNanoUsdPerToken": "0",
"longContext": {
"header": "TypeSafe-Danger-Zone-Long-Context",
"headerValue": "true",
"models": [
"jev-1.14.0",
"jev-1.13.0"
],
"defaultPerRequestLabel": "64k",
"defaultPerQuestionLabel": "32k",
"enabledPerRequestLabel": "262k",
"enabledPerQuestionLabel": "262k",
"officialExactTokenLimit": null,
"officialLimitBasis": "Official page publishes 262k, without an exact integer.",
"sameInputTokenPrice": true,
"nanoUsdPerInputToken": "42",
"outputNanoUsdPerToken": "0",
"reservationInputTokenCap": "262144",
"reservationMaxMicroUsd": "11011",
"exactCostAtReservationCapNanoUsd": "11010048",
"reservationBasis": "OpenAny conservative bound, not a claimed exact provider context limit.",
"sourceUrl": "https://docs.typesafe.ai/models#long-context",
"checkedAt": "2026-10-29",
"enabledInContract": true
}
}
}
}
```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 } }