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"
}
]
}
noulbecomes an OpenAIpredicate; itsprobabilityis returned asanswers.<id>.noul.- Choice
criteriakeys becomechoices[].valueand their texts becomechoices[].description. - Score
criteriaentries become orderedlevels[].label. stateis sent as OpenAIinput; question IDs become questionnames.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
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
model | string | Yes | -- | openai/gpt-6-luna-decisions | Public model ID; upstream model is gpt-6-luna. |
state | string / array | Yes | -- | Up to 922,000 input tokens | Shared 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. |
questions | object | Yes | -- | 1–400 entries | Named questions; the IDs are returned as answer keys. |
questions.<id>.type | string | Yes | -- | noul, choice, score | Question type. |
questions.<id>.instructions | string / array | Yes | -- | String ≤1,048,576 characters; array 1–16,384 parts | The question. Text or input_text, input_image, input_json content parts. |
questions.<id>.criteria | object / array | For choice and score | -- | Choice: 2–255 options; Score: 2–10 levels | Choice: option ID → description. Score: ordered level descriptions. Omit (or null) for Noul. |
prompt_cache_key | string / null | No | -- | ≤64 characters | Partitions prompt cache reuse. |
prompt_cache_options.mode | string / null | No | implicit | implicit, explicit | Explicit mode caches only at marked shared-input boundaries. |
prompt_cache_options.ttl | string | No | 30m | 30m | Cache lifetime; Decisions supports 30 minutes. |
safety_identifier | string / null | No | -- | ≤128 characters | Opaque identifier for your end user. |
provider | object | No | -- | -- | Infron routing options. |
usage.include | boolean | No | false | true, false | Include 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
| Parameter | Type | Range | Description |
|---|---|---|---|
id, request_id | string | -- | Platform request ID. |
model | string | -- | Public model ID. |
provider, service_tier | string | -- | Selected route. |
answers | object | Request question IDs | One answer per question. |
answers.<id>.type | string | noul, choice, score, refusal | Answer type. |
answers.<id>.noul | number | 0–1 | Yes probability. |
answers.<id>.choice | string | Choice option IDs | Selected option. |
answers.<id>.score | number | 0 to levels minus 1 | Probability-weighted level. |
answers.<id>.probabilities | object | Values 0–1 | Probability per option ID or level index. |
answers.<id>.legend | object | -- | Score level index → level description. |
answers.<id>.confidence | number | 0–1 | Choice/Score confidence. |
usage.input_tokens, usage.output_tokens | integer | Non-negative | Actual OpenAI usage; input includes cached and image tokens. |
usage.cache_read_tokens, usage.cache_write_tokens | integer | Positive | Cached and cache-write input tokens; present only when non-zero. |
cost, cost_details | number / object | USD | Platform cost and breakdown when requested. |
3. Detailed Pricing
| Model | Billing unit | Input price | Output price |
|---|---|---|---|
| GPT-6 Luna Decisions: ordinary input | Per 1 million tokens | $0.10 | Free |
| GPT-6 Luna Decisions: cached input | Per 1 million tokens | $0.01 | Free |
| GPT-6 Luna Decisions: 30m cache writes | Per 1 million tokens | $0.125 | Free |
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.