Create a decision
/v1/decisionsCreate a decision.
Compatible with OpenAI's Decisions API: the body is forwarded to OpenAI as sent and OpenAI's answer is returned as is. A request without model is a 400. With a virtual key a provider/ prefix on model is removed before the call.
Authenticate with an OpenAI virtual key (BYOK or PLATFORM) or with x-provider: openai and x-api-key; any other provider is a 422. The key's checks, the plan's limits and the organization's approved-provider policy (403) apply. Tool outputs in input (function_call_output, custom_tool_call_output) are scanned for injected instructions at the key's tool-scan action: a BLOCK is a 422 with x-tool-scan-status: BLOCK and nothing is sent. INPUT guardrails (the key's and x-guardrail) run over every text the model reads, including each question's instructions; a REDACT rewrites the text and a BLOCK is a 422. You are charged for the input tokens only, cached input at the model's cache rates. Without x-retry-count a failed call is retried up to 3 times on 429 and 5xx. OpenAI's own errors are returned unchanged: status, body and Retry-After.
Authorization
AuthorizationBearer <slug>.<secret>A virtual key's API key (
vk-....<secret>), asAuthorization: Bearer. What the OpenAI SDK sends from itsapi_key. Used by the inference endpoints.- or
x-virtual-keyheaderA virtual key's API key in the
x-virtual-keyheader, for clients that keepAuthorizationfor something else. - or
x-api-keyheaderDirect credentials: the provider's own API key in
x-api-key, with the provider named inx-provider(for exampleopenai). On/v1/messagesa virtual key is accepted inx-api-keytoo, which is what the Claude SDK sends.
Headers
x-providerstringWith direct credentials: the provider
x-api-keybelongs to, for exampleopenaioranthropic(case and dashes are normalised). Not used with a virtual key.x-retry-countinteger<int32>How many times to retry a failed provider call, 0 to 5. Without the header, chat completions, Claude Messages and prompt completions do not retry, and the other endpoints retry up to 3 times. Retries back off exponentially from 1 second and honour a numeric
Retry-After. The number made is in thex-retry-countresponse header.x-retry-status-codesstringComma-separated provider status codes to retry on. Default
429,500,502,503,504,529.x-guardrailstringA guardrail slug (
gr-...) to apply to this request, in addition to any the virtual key carries. A BLOCK is a 422 withx-guardrail-status: BLOCK.