A model reached through the other format is translated both ways, so you can keep one client and switch models by name.
Both endpoints use your project-scoped Opper API key. Provider credentials are managed by Opper. Your organization needs a card on file, and your project’s model access rules and provider access requirements apply.
Question types
You can include several questions in one request.
Set a project API key from the platform for the examples below:
OpenAI Decisions
Send OpenAI’s Decisions format toPOST https://api.opper.ai/v3/compat/decisions:
model:gpt-6-luna, or the full catalog ID of another decision model, such astypesafe/jev-1.13.0.input: a string, or user messages whosecontentis a string or a list ofinput_textandinput_imageparts. Images must be inline base64data:URLs. An image part takes an optionaldetailoflow,high,auto, ororiginal.questions: a list ofpredicate,choice, andscorequestions. Each requirestypeandinstructionsand takes an optionalname, unique within the request.choicetakes 2–255choiceswhosevalueis a string or a boolean;scoretakes 2–10 orderedlevels, each with alabel.safety_identifier(optional): accepted for compatibility with OpenAI’s SDK, then dropped. Opper neither forwards nor stores it; requests to OpenAI carry Opper’s own identifier for your project.
name.
Classify a support request
Ask about an image
gpt-6-luna reads images. This request sends an 8×8 red PNG:
answers:
400 for image input.
Use the OpenAI SDK
The OpenAI Python SDK calls this endpoint from version 3.26.0. Point it at Opper:Declined questions
The model can decline a question. That answer is{"type": "refusal", "name": "..."} with no probability, and the other answers are unaffected. The request is billed as usual.
Other decision models
Name any other decision model by its full catalog ID, such astypesafe/jev-1.13.0 or opper/kev-4b. Opper translates the request to System One and the answer back, so the response has the same shape. For these models:
- Text parts join into one input, and image input returns
400. - Boolean choice values reach the model as the text
trueandfalse, so a question cannot hold both the string"true"and the booleantrue. usagereportsinput_tokens,output_tokens, andtotal_tokens.
"model": "typesafe/jev-1.13.0", answers:
TypeSafe System One
Send requests toPOST https://api.opper.ai/v3/compat/v1/systemone.
Existing TypeSafe HTTP clients can change their base URL to https://api.opper.ai/v3/compat and authenticate with Authorization: Bearer $OPPER_API_KEY. Send the native state and questions format to /v1/systemone.
Every request contains:
model: a decision model ID, such astypesafe/jev-1.13.0.state: the context to evaluate, as a string, object, or array.questions: a nonempty object of named questions. Each question requirestypeandinstructions.
choice requires a criteria object with 1–255 categories. score requires an ordered criteria array with 2–10 levels. noul does not require criteria; you can optionally describe the true and false outcomes in a criteria object.
Answers use the same keys as your questions.
Detect a refund request
Route a support request
answers.team:
Score urgency
answers.urgency:
Use the TypeSafe SDK
The TypeSafe SDK works with Opper unchanged: set its base URL tohttps://api.opper.ai/v3/compat and use your Opper API key. In Python (typesafe-sdk):
@typesafe-ai/sdk) works the same way; see Drop-in SDKs.
OpenAI’s model on System One
gpt-6-luna answers System One requests as openai/gpt-6-luna-decisions, text only. Opper sends structured state and instructions as compact JSON text and adds a noul question’s true and false criteria to its instructions. A choice needs at least two categories. If the model declines a question, the request returns 422 naming it, and the call is billed because OpenAI bills it.
Answers and token counts can vary between calls.
Choose a model
Discover decision models with:gpt-6-luna) and TypeSafe’s on System One (jev-1.13.0, jev-latest, and jev-preview resolve to TypeSafe catalog entries). Use the full catalog ID for every other model on either endpoint, such as typesafe/jev-1.13.0, opper/kev-4b, or openai/gpt-6-luna-decisions. The qualified aliases typesafe/jev-latest and typesafe/jev-preview are supported too.
Aliases follow Opper’s approved catalog mapping. They do not automatically follow a new upstream TypeSafe release. The response’s model identifies the upstream model that answered.
Jev 1.13 has a 64k total context limit, with a separate 32k limit for the state plus the longest question. TypeSafe enforces these limits using its own tokenizer.
Decision models, the catalog IDs
GET /v3/models?type=evaluation lists (such as typesafe/jev-1.13.0 and openai/gpt-6-luna-decisions), answer only on these two endpoints. Chat Completions and the other generation protocols do not accept them. A bare gpt-6-luna on those protocols is OpenAI’s chat model, which works as usual. Both decision endpoints are synchronous; streaming, tools, and fields outside each format are unsupported.Usage, cost, and traces
gpt-6-luna on Decisions returns OpenAI’s response body unchanged, including its usage details. Translated Decisions responses carry usage.input_tokens, usage.output_tokens, and usage.total_tokens; System One responses carry usage.input_tokens and usage.output_tokens. Opper does not add a response envelope.
Billing uses the selected endpoint’s catalog input and output token prices, including any long-context surcharge the catalog lists. See the model catalog for current pricing.
Add -i to a curl call to see these response headers:
Usage and billing are recorded for successful calls and for questions the model declined. Full input/output traces depend on your Opper retention rule; in traces, each inline image appears as a placeholder with its size. Provider data policies are configured separately through model access; EU gateway hosting does not make every provider EU-hosted.
Errors
See the API reference for Decisions and System One, OpenAI’s Decisions guide, or TypeSafe’s API documentation for the native protocols.