OpenAI: GPT-6 Luna Decisions API Reference

About

OpenAI GPT-6 Luna Decisions evaluates text, images, and JSON for classification, routing, and scoring through the OpenAI Decisions API. It uses the same Decisions request and answer format as every other Infron Decisions model: Noul, Choice, and Score questions with criteria, answered by question ID. Each request accepts 1–400 questions; the model context window is 1,050,000 tokens with up to 922,000 input tokens. Infron routes requests to OpenAI's gpt-6-luna, bills actual input usage including 30-minute prompt caching, and charges nothing for output.

1. Calling the API

Setup your API Key

To begin using Infron, create an account and generate your API Key.

export INFRON_KEY="YOUR_API_KEY"

Submit a request

Send JSON to POST https://llm.onerouter.pro/v1/decisions using your Infron API key.

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-6-luna-decisions",
  "state": "The package arrived with a cracked screen. Please arrange a replacement.",
  "questions": {
    "damaged": {
      "type": "noul",
      "instructions": "Does the customer report a damaged item?"
    },
    "department": {
      "type": "choice",
      "instructions": "Which department should handle this request?",
      "criteria": {
        "support": "Damaged items and replacements",
        "sales": "New purchases"
      }
    },
    "severity": {
      "type": "score",
      "instructions": "Rate the impact of the reported issue.",
      "criteria": [
        "Minor cosmetic issue",
        "A damaged screen prevents normal use"
      ]
    }
  },
  "provider": {
    "only": [
      "openai"
    ],
    "allow_fallbacks": false
  },
  "usage": {
    "include": true
  }
}'

Response

The answers, token count and cost below come from a real OpenAI call for this request on 2026-10-30, converted to the Infron answer format. The request ID is a placeholder.

{
  "id": "request_id_example",
  "request_id": "request_id_example",
  "model": "openai/gpt-6-luna-decisions",
  "provider": "openai",
  "service_tier": "standard",
  "answers": {
    "damaged": {
      "noul": 1,
      "type": "noul"
    },
    "department": {
      "choice": "support",
      "confidence": 1,
      "probabilities": {
        "sales": 0,
        "support": 1
      },
      "type": "choice"
    },
    "severity": {
      "confidence": 0.96,
      "legend": {
        "0": "Minor cosmetic issue",
        "1": "A damaged screen prevents normal use"
      },
      "probabilities": {
        "0": 0.02,
        "1": 0.98
      },
      "score": 0.98,
      "type": "score"
    }
  },
  "usage": {
    "input_tokens": 398,
    "output_tokens": 0
  },
  "cost": 0.00004,
  "cost_details": {
    "audio_cost": 0,
    "byok_cost": 0,
    "completion_cost": 0,
    "discount_rate": 1,
    "image_cost": 0,
    "is_byok": false,
    "native_web_search_cost": 0,
    "plugin_web_search_cost": 0,
    "prompt_cache_read_cost": 0,
    "prompt_cache_write_1_h": 0,
    "prompt_cache_write_5_min": 0,
    "prompt_cache_write_cost": 0,
    "prompt_cost": 0.0000398,
    "reasoning_cost": 0,
    "tools_cost": 0,
    "video_cost": 0
  }
}

How the request reaches OpenAI

Infron converts the common Decisions format to the OpenAI Decisions format and converts the answers back, so the same request works with every Decisions model. For the request above OpenAI receives:

{
  "input": "The package arrived with a cracked screen. Please arrange a replacement.",
  "model": "gpt-6-luna",
  "questions": [
    {
      "instructions": "Does the customer report a damaged item?",
      "name": "damaged",
      "type": "predicate"
    },
    {
      "choices": [
        {
          "description": "New purchases",
          "value": "sales"
        },
        {
          "description": "Damaged items and replacements",
          "value": "support"
        }
      ],
      "instructions": "Which department should handle this request?",
      "name": "department",
      "type": "choice"
    },
    {
      "instructions": "Rate the impact of the reported issue.",
      "levels": [
        {
          "label": "Minor cosmetic issue"
        },
        {
          "label": "A damaged screen prevents normal use"
        }
      ],
      "name": "severity",
      "type": "score"
    }
  ]
}
  • noul becomes an OpenAI predicate; its probability is returned as answers.<id>.noul.
  • Choice criteria keys become choices[].value and their texts become choices[].description.
  • Score criteria entries become ordered levels[].label.
  • state is sent as OpenAI input; question IDs become question names.
  • provider, usage, and any field not listed in the schema are not sent to OpenAI.

Image request

Put images in state as OpenAI input items. This runnable example embeds a 256×256 PNG of a red square on a white background.

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-6-luna-decisions",
  "state": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Inspect the supplied image."
        },
        {
          "type": "input_image",
          "image_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAACXBIWXMAAAABAAAAAQBPJcTWAAAC00lEQVR4nO3TsQ0EMQzAsA/w+6/sGyJFYIicQI3OzPyg6v86AF4yAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDS1g8w57xOSDszrxOurB8AbhiANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGnrBzgzrxNYbP0AcMMApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUj7AIpSC/qGa+ppAAAAAElFTkSuQmCC"
        }
      ]
    }
  ],
  "questions": {
    "square_color": {
      "type": "choice",
      "instructions": "What is the color of the square in the image?",
      "criteria": {
        "red": "Red",
        "blue": "Blue",
        "green": "Green"
      }
    }
  },
  "provider": {
    "only": [
      "openai"
    ],
    "allow_fallbacks": false
  },
  "usage": {
    "include": true
  }
}'

A real call with this image returned choice red with probabilities red 0.59, blue 0.24, green 0.17, confidence 0.38, and 186 input tokens.

To build a data URL from a local file:

import base64
from pathlib import Path

image_url = "data:image/png;base64," + base64.b64encode(
    Path("image.png").read_bytes()
).decode("ascii")

Routing and usage

provider and usage.include are Infron fields. They are not forwarded to OpenAI. Set provider.only to ["openai"] to select this route, and provider.allow_fallbacks to false to keep the request on it. usage.include=true adds cost and cost_details to the response. Charges use OpenAI's actual input usage; cached and cache-write tokens are reported in usage when present and billed at their own rates. Output tokens are free.

Errors

Question counts, option counts, types, and required fields are checked before the request is sent; invalid requests return HTTP 400 with error.message. OpenAI performs the remaining content, media, uniqueness, and context validation, and its errors are returned through the gateway. When OpenAI declines a question, its answer is {"type": "refusal"}. Streaming is not available.

2. Schema

Input

ParameterTypeRequiredDefaultRangeDescription
modelstringYes--openai/gpt-6-luna-decisionsPublic model ID; upstream model is gpt-6-luna.
statestring / arrayYes--Up to 922,000 input tokensShared text, or ordered OpenAI input items (input_text, input_image, input_json parts). Strings up to 10,485,760 characters; arrays up to 131,072 items.
questionsobjectYes--1–400 entriesNamed questions; the IDs are returned as answer keys.
questions.<id>.typestringYes--noul, choice, scoreQuestion type.
questions.<id>.instructionsstring / arrayYes--String ≤1,048,576 characters; array 1–16,384 partsThe question. Text or input_text, input_image, input_json content parts.
questions.<id>.criteriaobject / arrayFor choice and score--Choice: 2–255 options; Score: 2–10 levelsChoice: option ID → description. Score: ordered level descriptions. Omit (or null) for Noul.
prompt_cache_keystring / nullNo--≤64 charactersPartitions prompt cache reuse.
prompt_cache_options.modestring / nullNoimplicitimplicit, explicitExplicit mode caches only at marked shared-input boundaries.
prompt_cache_options.ttlstringNo30m30mCache lifetime; Decisions supports 30 minutes.
safety_identifierstring / nullNo--≤128 charactersOpaque identifier for your end user.
providerobjectNo----Infron routing options.
usage.includebooleanNofalsetrue, falseInclude cost details.

Question types

Noul: yes/no probability. Returns answers.<id>.noul from 0 to 1. OpenAI predicates have no yes/no definitions, so put the whole question in instructions and leave out criteria.

Choice: classification. criteria maps 2–255 option IDs to descriptions. The answer contains choice, probabilities keyed by option ID, and confidence.

Score: ordered rating. criteria lists 2–10 level descriptions from lowest to highest. score is a probability-weighted index from 0 to the number of levels minus one; probabilities and legend are keyed by level index.

Media inputs

Images go in state items or in instructions content parts as {"type": "input_image", "image_url": "..."}. image_url can be a public HTTP/HTTPS URL or a Base64 data URL; file IDs are not supported. Optional detail is auto, low, high, or original (default auto). Structured data uses {"type": "input_json", "data": {...}}: an object or an array of objects, up to 32 nesting levels, 10,000 values, and 256 KiB of compact UTF-8 JSON. Image usage is included in input tokens. For prompt caching, keep the shared input identical; the cached prefix must be at least 1,024 tokens. Shared text and image parts may carry prompt_cache_breakpoint: {"mode": "explicit"}; question instructions cannot.

Output

ParameterTypeRangeDescription
id, request_idstring--Platform request ID.
modelstring--Public model ID.
provider, service_tierstring--Selected route.
answersobjectRequest question IDsOne answer per question.
answers.<id>.typestringnoul, choice, score, refusalAnswer type.
answers.<id>.noulnumber0–1Yes probability.
answers.<id>.choicestringChoice option IDsSelected option.
answers.<id>.scorenumber0 to levels minus 1Probability-weighted level.
answers.<id>.probabilitiesobjectValues 0–1Probability per option ID or level index.
answers.<id>.legendobject--Score level index → level description.
answers.<id>.confidencenumber0–1Choice/Score confidence.
usage.input_tokens, usage.output_tokensintegerNon-negativeActual OpenAI usage; input includes cached and image tokens.
usage.cache_read_tokens, usage.cache_write_tokensintegerPositiveCached and cache-write input tokens; present only when non-zero.
cost, cost_detailsnumber / objectUSDPlatform cost and breakdown when requested.

3. Detailed Pricing

ModelBilling unitInput priceOutput price
GPT-6 Luna Decisions: ordinary inputPer 1 million tokens$0.10Free
GPT-6 Luna Decisions: cached inputPer 1 million tokens$0.01Free
GPT-6 Luna Decisions: 30m cache writesPer 1 million tokens$0.125Free

These are OpenAI's official Standard prices with no discount. For requests above 272,000 input tokens, all input and cache prices double for the whole request. Ordinary input is total input minus cache-read and cache-write tokens; each part is billed at its own rate. Image usage is included in input tokens. Team pricing still applies.

Sources: Decisions guide, API reference, GPT-6 Luna model, pricing.