GPT-6 Luna
Model Overview
On /v1/decisions GPT-6 Luna does not generate text. You give it some content and a list of typed questions, and it returns a typed answer for each with calibrated probabilities — a yes/no probability, one option out of a set, or a position on an ordered scale.
It is the same model served on /v1/chat/completions and /v1/responses: fast and cost-efficient, text and image input, a 1,050,000-token context. The decision surface is simply a different way to call it, and the one to reach for when you want a verdict your code can branch on rather than prose it has to parse.
API Schema
Shared evidence for every question: a text string, or user/system/developer/assistant messages. User messages may combine input_text and input_image parts.
I was charged twice for my order.Partitions prompt cache reuse by a key you choose.
POST /v1/decisions HTTP/1.1
Host: api.aimlapi.com
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"model": "openai/gpt-6-luna",
"input": "I was charged twice for my order.",
"questions": [
{
"type": "predicate",
"name": "text",
"instructions": "text"
}
],
"prompt_cache_key": "text"
}{
"model": "text",
"answers": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "noul",
"noul": 1
}
},
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}Code Example
Reading the answers
answers is an array in the order you asked, each item echoing the name you gave it — index into it by name, not by position, if you build the question list dynamically.
predicatereturnsprobability: how likely the condition is true, 0–1.choicereturns the winningvalueinchoice, aconfidence, andprobabilitiesas an array of{value, probability}that sums to 1.scorereturnsscore, the probability-weighted level index starting at 0 —1.01above means "Frustrated" with a trace of "Very angry" — plusprobabilitiesas{value, label, probability}per level.
As with the other decision models output_tokens is 0: it reaches the answer without emitting tokens, so the whole cost is the input. The call above billed $0.000053 and came back in 198 ms.
Longer inputs and prompt caching
input also takes the Responses-style array of message objects, so you can pass a whole conversation instead of a string:
When the same prefix is evaluated repeatedly — a long rubric, a fixed policy document — add prompt_cache_key (up to 64 characters) to partition cache reuse by a key of your choosing. usage.input_tokens_details then reports cached_tokens and cache_write_tokens so you can see whether it is working.
Last updated
Was this helpful?