Skip to content
DocsOpenAI Decisions
AI features

OpenAI Decisions

OpenAI’s Decisions API answers typed questions about your input instead of generating text: the probability that a condition holds, one choice from options you define, or a score against ordered levels. VectorAxis serves it on OpenAI’s own path, POST /v1/decisions, in OpenAI’s own format, so the OpenAI SDK works by changing its base URL and key.

Python
from openai import OpenAI

client = OpenAI(
    api_key="vk-1a2b3c4d5e6f7a8b.Xk3pQ9vN2mR7tY1wZ8bC4dF6gH0jK5lM3nP7qS9uV2w",  # an OpenAI virtual key
    base_url="https://api.vectoraxis.ai/v1",
)

decision = client.decisions.create(
    model="gpt-6-luna",
    input="I was charged twice for order 1042. Please fix this today.",
    questions=[
        {"type": "predicate", "name": "duplicate_charge",
         "instructions": "Does the customer report a duplicate charge?"},
        {"type": "choice", "name": "team", "instructions": "Which team should handle it?",
         "choices": [{"value": "billing"}, {"value": "shipping"}, {"value": "tech"}]},
        {"type": "score", "name": "urgency", "instructions": "How urgent is this?",
         "levels": [{"label": "can wait"}, {"label": "this week"}, {"label": "today"}]},
    ],
)

for answer in decision.answers:
    print(answer)
When to use it
  • Classification, routing and triage. A choice answer is always one of your values, so your code can switch on it; its confidence tells you when to ask a person instead.
  • Checks inside an agent. Questions can be about a conversation, tool calls and tool outputs, as well as text, images and JSON.
  • Not for writing. Use chat completions or the Responses API for generated text.
Keys

Use an OpenAI virtual key, sent as Authorization: Bearer vk-….… (what the SDK does) or x-virtual-key. Bring your own OpenAI key, or use a platform (credit-mode) key: unlike the audio, image and file endpoints, Decisions accept platform keys, billed with their markup. For a quick test without a virtual key, send x-provider: openai plus x-api-key. A key for any other provider is refused with a 422.

The endpoint

One endpoint, POST /v1/decisions; there is no streaming and nothing to retrieve later. The body is OpenAI’s and goes through as you send it (VectorAxis settings travel in headers), so everything in OpenAI’s API reference works: messages, images, input_json, tool calls and their outputs, up to 400 questions, prompt_cache_key. gpt-6-luna is the only model OpenAI serves it on.

Bash
curl https://api.vectoraxis.ai/v1/decisions \
  -H "Authorization: Bearer vk-1a2b3c4d5e6f7a8b.Xk3pQ9vN2mR7tY1wZ8bC4dF6gH0jK5lM3nP7qS9uV2w" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "input": "Help! My payouts have been failing for 3 days.",
    "questions": [
      { "type": "predicate", "name": "urgent", "instructions": "Does this convey urgency?" }
    ]
  }'
typeYou sendAnswer
predicateinstructionsprobability, 0 to 1, that the condition holds.
choiceinstructions and 2 to 255 choiceschoice, probabilities over every value, and confidence.
scoreinstructions and 2 to 10 levels, lowest firstscore (a position that can fall between levels), probabilities and confidence.

Any question can come back as a refusal. See OpenAI’s Decisions guide for the full semantics.

What VectorAxis adds
How it applies to Decisions
Budgets & limitsThe key’s credit limit, expiry and requests-per-minute, per-day and tokens-per-minute limits apply, and your plan’s workspace request limit. Spend counts against the same credit limit as the rest of the key’s traffic; a key that runs out moves to EXHAUSTED. A model allowlist on the key applies too.
GuardrailsInput guardrails (the key’s and any in x-guardrail) run over every text the model reads: the input text, each message’s text, the strings inside input_json, tool outputs and each question’s instructions. BLOCK stops the call before it reaches OpenAI; REDACT masks the text first. Images, tool-call arguments and your choice and level labels are not checked, and there is no output phase: answers are probabilities and your own labels.
Tool-result scanTool outputs in the input (function_call_output, custom_tool_call_output) get the same prompt-injection scan as on chat, at the key’s Tool results setting: a block stops the call with a 422, a redaction masks the output before OpenAI sees it.
CostInput only, as OpenAI bills Decisions: uncached input at the model’s input rate, cached input at its cache-read rate and cache writes at its cache-write rate (for gpt-6-luna: $0.10, $0.01 and $0.125 per million tokens). Output tokens are free. The cost is on the log entry and in the x-operation-cost-usd response header.
LogsEvery call is a log entry with operation openai_decision: tokens, cost, the number of questions and the lowest confidence in the call. With request bodies stored, the entry lists each answer. See Request logs.
Retries & errors429 and 5xx from OpenAI are retried with backoff, honouring Retry-After (tune with x-retry-count). OpenAI’s own errors come back unchanged, so the SDK raises its usual exceptions; errors from VectorAxis itself, such as an exhausted key or a guardrail block, use the platform’s format.
Not supported (yet)
  • Caching, fallback and routing configs. x-cache-*, x-fallback-* and x-config do not apply.
  • Regional processing and long-context pricing. OpenAI’s surcharges for these are not added to the logged cost.
  • The playground. It is built for chat; call Decisions from code or the SDK.
Using TypeSafe’s Jev for decisions instead? See System One.
NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.