APIAI Generation

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...
USE THIS API

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
Connect your agent
On this page

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
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*object

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.
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.
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.

Sample response

{
  "answers": {
    "billing": {
      "noul": 0.98,
      "type": "noul"
    }
  },
  "model": "jev-1.14.0",
  "usage": {
    "input_tokens": 120,
    "output_tokens": 12
  }
}

Response result

Response structure

Provider documentation
  • modelstring

    Name of the model that answered the questions. May differ from the alias supplied in the request.

  • answersobject

    Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.

    • [key]object
      • type"noul"

        Identifies a yes/no answer.

      • noulnumber

        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.

      • type"choice"

        Identifies a selection from the requested choices.

      • choicestring

        The name of the choice with the highest probability among the question's criteria.

      • confidencenumber

        Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.

      • probabilitiesobject

        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.

        • [key]number
      • type"score"

        Identifies a rating against the requested score levels.

      • scorenumber

        Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.

      • confidencenumber

        Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.

      • legendobject

        The requested criteria mapped to their score levels, so you can interpret the score.

        • [key]string | object | unknown[]
      • probabilitiesobject

        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.

        • [key]number
      • type"box"

        Identifies a box answer.

      • boxobject

        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.

        • topnumber

          Top edge of the box, as a fraction of image height from the top (0-1).

        • bottomnumber

          Bottom edge of the box, as a fraction of image height from the top (0-1).

        • leftnumber

          Left edge of the box, as a fraction of image width from the left (0-1).

        • rightnumber

          Right edge of the box, as a fraction of image width from the left (0-1).

      • confidencenumber | null

        Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.

  • usageobject

    Input and output token counts for this evaluation.

    • input_tokensinteger

      Number of billable input tokens used to evaluate the request.

    • output_tokensinteger

      Number of output tokens used to answer the questions. Output tokens are currently free of charge.

Sellers

SellerPricingRequests · 30dPerformanceAccess
typesafeCurrent
TypeSafe Text and Image Decisions · POST · View API reference
$0.042 / million input tokens—
—successP50—
Loading...
Selected pricing · typesafeUSD / million input tokens
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}.

ParameterLocationTypeRequiredDescription
AuthorizationRequest headersheadersstringYesUse an OpenAny API key. The TypeSafe credential is managed by OpenAny.
Idempotency-KeyRequest headersheadersstringYesRequired OpenAny idempotency key. Reuse it only for the same request; it is not forwarded to TypeSafe.

minLength: 1 · maxLength: 128

TypeSafe-Danger-Zone-ImagesRequest headersheadersstringNoSet 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-ContextRequest headersheadersstringNoSet 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.

modelJSON request bodybodystringYesName 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.

stateJSON request bodybodystring | object | arrayYesThe content all questions in this request refer to.
questionsJSON request bodybodyobjectYesQuestions 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

body.questions.{name} · Named entries · object

Nested fields and variants

Noul

A yes/no question or statement, answered with the probability of yes or true.

Nested fields and variants
body.questions.{name}.criteria object | null · Optional

Parent object: body.questions.{name}

Criteria clarifying what counts as a yes or no answer.
Nested fields and variants

NoulCriteria

Criteria defining what counts as a yes or no answer.

Nested fields and variants
body.questions.{name}.criteria.false string | object | array | null · Optional

Parent object: body.questions.{name}.criteria

What counts as a no answer.
body.questions.{name}.criteria.true string | object | array | null · Optional

Parent object: body.questions.{name}.criteria

What counts as a yes answer.
body.questions.{name}.instructions string | object | array | null · Optional

Parent object: body.questions.{name}

The yes/no question or statement to evaluate.
body.questions.{name}.type string · Required

Parent object: body.questions.{name}

Identifies a yes/no question or statement.

const: "noul"

Choice

A question that selects one option from the choices you define.

Nested fields and variants
body.questions.{name}.criteria object · Required

Parent object: body.questions.{name}

Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.

minProperties: 1 · maxProperties: 255

Nested fields and variants

body.questions.{name}.criteria.{name} · Named entries · string | object | array | null

body.questions.{name}.instructions string | object | array | null · Optional

Parent object: body.questions.{name}

What the model should decide when choosing an option.
body.questions.{name}.type string · Required

Parent object: body.questions.{name}

Identifies a question that selects one of the choices in criteria.

const: "choice"

Score

A question that assigns a score using an ordered rubric.

Nested fields and variants
body.questions.{name}.criteria array · Required

Parent object: body.questions.{name}

Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.

minItems: 1 · maxItems: 10

Nested fields and variants

body.questions.{name}.criteria[] · Array item · string | object | array

body.questions.{name}.instructions string | object | array | null · Optional

Parent object: body.questions.{name}

What the model should rate.
body.questions.{name}.type string · Required

Parent object: body.questions.{name}

Identifies a question that rates the content using the levels in criteria.

const: "score"

Box

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.

Nested fields and variants
body.questions.{name}.instructions string | object | array | null · Optional

Parent object: body.questions.{name}

What to locate in the image.
body.questions.{name}.type string · Required

Parent object: body.questions.{name}

Identifies a box question.

const: "box"

assetsJSON request bodybodyobjectNoMedia 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

body.assets.{name} · Named entries · object

Nested fields and variants
body.assets.{name}.data_base64 string · Required

Parent object: body.assets.{name}

Standard padded Base64, without whitespace or a data: prefix. Decoded PNG/JPEG at most 16 MiB; image validation is required in the gateway.

minLength: 4 · maxLength: 22369624 · pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$

body.assets.{name}.format string · Required

Parent object: body.assets.{name}

The image format, required with data_base64. The actual format is detected from the bytes.

enum: "png", "jpg", "jpeg"

body.assets.{name}.type string · Optional

Parent object: body.assets.{name}

Identifies an image asset.

const: "image"

Required markers inside a nested object or variant apply when that object or variant is used.

Full provider request schema
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.

ParameterLocationTypeRequiredDescription
modelJSON response bodyresponsestringYesName of the model that answered the questions. May differ from the alias supplied in the request.
answersJSON response bodyresponseobjectYesAnswers keyed by the question names supplied in the request. Each answer's type matches its question's type.

minProperties: 1

Nested fields and variants

response.answers.{name} · Named entries · object

Nested fields and variants

Noul

The probability of a yes answer or a true statement.

Nested fields and variants
response.answers.{name}.type string · Required

Parent object: response.answers.{name}

Identifies a yes/no answer.

const: "noul"

response.answers.{name}.noul number · Required

Parent object: response.answers.{name}

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.

Choice

The selected choice, confidence, and probabilities for a choice question.

Nested fields and variants
response.answers.{name}.type string · Required

Parent object: response.answers.{name}

Identifies a selection from the requested choices.

const: "choice"

response.answers.{name}.choice string · Required

Parent object: response.answers.{name}

The name of the choice with the highest probability among the question's criteria.
response.answers.{name}.confidence number · Required

Parent object: response.answers.{name}

Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.
response.answers.{name}.probabilities object · Required

Parent object: response.answers.{name}

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.
Nested fields and variants

response.answers.{name}.probabilities.{name} · Named entries · number

Score

An expected score with its rubric, confidence, and score-level probabilities.

Nested fields and variants
response.answers.{name}.type string · Required

Parent object: response.answers.{name}

Identifies a rating against the requested score levels.

const: "score"

response.answers.{name}.score number · Required

Parent object: response.answers.{name}

Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.
response.answers.{name}.confidence number · Required

Parent object: response.answers.{name}

Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.
response.answers.{name}.legend object · Required

Parent object: response.answers.{name}

The requested criteria mapped to their score levels, so you can interpret the score.
Nested fields and variants

response.answers.{name}.legend.{name} · Named entries · string | object | array

response.answers.{name}.probabilities object · Required

Parent object: response.answers.{name}

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.
Nested fields and variants

response.answers.{name}.probabilities.{name} · Named entries · number

Box

A located box with normalized edge coordinates and confidence.

Nested fields and variants
response.answers.{name}.type string · Required

Parent object: response.answers.{name}

Identifies a box answer.

const: "box"

response.answers.{name}.box object · Required

Parent object: response.answers.{name}

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.
Nested fields and variants
response.answers.{name}.box.top number · Required

Parent object: response.answers.{name}.box

Top edge of the box, as a fraction of image height from the top (0-1).
response.answers.{name}.box.bottom number · Required

Parent object: response.answers.{name}.box

Bottom edge of the box, as a fraction of image height from the top (0-1).
response.answers.{name}.box.left number · Required

Parent object: response.answers.{name}.box

Left edge of the box, as a fraction of image width from the left (0-1).
response.answers.{name}.box.right number · Required

Parent object: response.answers.{name}.box

Right edge of the box, as a fraction of image width from the left (0-1).
response.answers.{name}.confidence number | null · Required

Parent object: response.answers.{name}

Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.
usageJSON response bodyresponseobjectYesInput and output token counts for this evaluation.
Nested fields and variants
response.usage.input_tokens integer · Required

Parent object: response.usage

Number of billable input tokens used to evaluate the request.
response.usage.output_tokens integer · Required

Parent object: response.usage

Number of output tokens used to answer the questions. Output tokens are currently free of charge.
Full provider response schema
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
ParameterLocationTypeRequiredDescription
detailJSON response bodyresponsestring | objectYesExplanation of the invalid request. String details and message fields are bounded, with shortened text ending with ….
HTTP 422
ParameterLocationTypeRequiredDescription
detailJSON response bodyresponsearrayNoValidation errors describing which request values are missing or invalid.
Nested fields and variants

response.detail[] · Array item · object

Nested fields and variants
response.detail[].loc array · Required

Parent object: response.detail[]

Path to the invalid value: the request location followed by field names and array indices. May be empty.
Nested fields and variants

response.detail[].loc[] · Array item · string | integer

response.detail[].msg string · Required

Parent object: response.detail[]

Human-readable explanation of the validation failure. May be shortened with ….
response.detail[].type string · Required

Parent object: response.detail[]

Machine-readable validation error code.
response.detail[].input string · Optional

Parent object: response.detail[]

Text preview of the rejected input. May be shortened with ….
response.detail[].ctx object · Optional

Parent object: response.detail[]

Additional context used to explain the validation failure. Entries may be omitted or shortened.

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.

Documentation template · Offline contract illustration
{
  "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 itemPriceMetering sourceWhenQuantity limit
Billable input tokens$0.042000 / million input tokensResponse · /usage/input_tokens · Numeric valueAlways262144 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
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/markets/apis/capabilities/typesafe-text-decisions
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

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. 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 · cURL
    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."
    }'
  3. 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
      }
    }

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use TypeSafe Text Decisions with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.