/v1/decisionsCreate a decision
The OpenAI Decisions API shape: ask up to 32 typed questions (predicate, choice, score) about one input and get calibrated probabilities back, in question order. Served by gpt-6-luna-decisions and gemini-decision-1.
Buffered only, no Idempotency-Key replay. The body has no id; use the x-request-id header to correlate. usage.cost and provider are added like on completions.
Authentication: Bearer API key in the Authorization header
Request body
modelstringrequiredA decisions model slug.
inputstring | array<object>requiredA string, or 1 to 256 user messages whose content is text or parts (
input_text,input_imagewith adata:image/...;base64,URL).questionsarray<object>requiredpredicate{instructions},choice{instructions, choices: 2 to 64{value, description?}}, orscore{instructions, levels: 2 to 10{label, description?}}. Each may carry a uniquename.safety_identifierstringOptional end-user identifier.
Responses
200One answer per question.
Response
modelstringanswersarray<object>In question order. A
refusalanswer can stand in for any question.usageobjectExperiential fields added to the provider's
usageobject.usage
costnumberUSD actually charged to your credits for this request, as a float (promotions and plan discounts already applied).
0on your own provider key.is_byokbooleanTrue when the request ran on your own provider key, which the platform never charges.
cost_detailsobjectPresent only in two cases:
upstream_inference_cost(USD, your own key: the provider's list charge to you) orlist_cost(USD, a platform-funded call charged below list: what it would have cost).cost_details
upstream_inference_costnumberlist_costnumber
providerstring
400Invalid request. param names the field; code says why (invalid_parameter, unsupported_parameter, unsupported_capability, refusal, previous_response_not_found). Not charged.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
401The key is missing, malformed, expired or revoked.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
402The organization must act first: card_required, email_unverified, org_under_review, free_tier_requires_payment or promotion_ended. The message names the step; retrying does not help.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
429insufficient_quota (out of credits, over a spend limit, or the model needs a purchase) and promo_credits_now (a free promotion is used up): add credits, the message names the step. rate_limit_exceeded, free_limit_reached, admission_capacity_exceeded: wait Retry-After seconds and retry.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
Request
curl https://api.experientiallabs.ai/v1/decisions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna-decisions",
"input": "Hi, I was charged twice for my October invoice.",
"questions": [
{"type": "predicate", "name": "is_billing", "instructions": "Is this about billing?"},
{"type": "choice", "name": "urgency", "instructions": "How urgent is it?",
"choices": [{"value": "low"}, {"value": "high"}]}
]
}'
Response
{
"model": "gpt-6-luna-decisions",
"answers": [
{
"type": "predicate",
"name": "is_billing",
"probability": 0.97
},
{
"type": "choice",
"name": "urgency",
"choice": "high",
"confidence": 0.82,
"probabilities": [
{
"value": "low",
"probability": 0.18
},
{
"value": "high",
"probability": 0.82
}
]
}
],
"usage": {
"input_tokens": 96,
"output_tokens": 0,
"cost": 0.0000096,
"is_byok": false
},
"provider": "openai"
}https://api.experientiallabs.ai/v1/decisions