POST/v1/decisions

Create 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

  • modelstringrequired

    A decisions model slug.

  • inputstring | array<object>required

    A string, or 1 to 256 user messages whose content is text or parts (input_text, input_image with a data:image/...;base64, URL).

  • questionsarray<object>required

    predicate {instructions}, choice {instructions, choices: 2 to 64 {value, description?}}, or score {instructions, levels: 2 to 10 {label, description?}}. Each may carry a unique name.

  • safety_identifierstring

    Optional end-user identifier.

Responses

  • 200

    One answer per question.

    Response
    • modelstring
    • answersarray<object>

      In question order. A refusal answer can stand in for any question.

    • usageobject

      Experiential fields added to the provider's usage object.

      usage
      • costnumber

        USD actually charged to your credits for this request, as a float (promotions and plan discounts already applied). 0 on your own provider key.

      • is_byokboolean

        True when the request ran on your own provider key, which the platform never charges.

      • cost_detailsobject

        Present only in two cases: upstream_inference_cost (USD, your own key: the provider's list charge to you) or list_cost (USD, a platform-funded call charged below list: what it would have cost).

        cost_details
        • upstream_inference_costnumber
        • list_costnumber
    • providerstring
  • 400

    Invalid request. param names the field; code says why (invalid_parameter, unsupported_parameter, unsupported_capability, refusal, previous_response_not_found). Not charged.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 401

    The key is missing, malformed, expired or revoked.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 402

    The 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
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 429

    insufficient_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
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"

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