Skip to main content
POST
Ask typed questions about a piece of content and get a calibrated answer for each one. model needs its provider prefix, for example typesafe/jev-1.13.0 or cloudflare/clef. List the available models with /v1/models/decision. See Decisions for the question types. Every answer has a type. A model can decline a question and return {"type": "refusal"} for it, so check type before reading the value. See OpenAI’s Decisions guide. Responses are not streamed. To send requests in TypeSafe’s System One format, use /v1/systemone.

Images

Models that accept images, such as cloudflare/clef and openai/gpt-6-luna, also look at images. Put each image in state as an image_url object with a base64 data URL. An image can sit anywhere in state: as an array item or as the value of an object field, at any depth. This endpoint does not accept assets; to send images as named assets, use /v1/systemone.

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json

Request body for POST /v1/decisions. Images go inside state; assets is rejected on this endpoint.

model
string
required

A decision model ID from /v1/models/decision.

Example:

"openai/gpt-6-luna"

state
any
required

The content to evaluate: a string, an object or an array, nested as deeply as you like. To include an image, put a DecisionStateImage object ({"type": "image_url", "image_url": {"url": "data:image/...;base64,..."}}) anywhere in state. Images work only on models that accept them, such as cloudflare/clef and openai/gpt-6-luna. Send images as base64 data URLs.

questions
object
required

Map of question ID to question. Each ID gets one entry in answers.

Response

Decision response

answers
object
required

One answer per question ID.

model
string
required

The upstream model name.

Example:

"gpt-6-luna"

usage
object
required
id
string
Example:

"rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193"

provider
string
Example:

"openai"

Last modified on October 16, 2026