GPT-6 Luna
OpenAI’s GPT-6 Luna is a chat model that also supports typed decisions through the Decisions API. The decision mode is used in the same way as Jev: a request provides the content to be evaluated and a set of questions, and the model returns a structured answer with probabilities for each question. Unlike Jev, GPT-6 Luna supports image input.
This page describes the decision usage of GPT-6 Luna. For chat usage, see GPT series.
Choosing between GPT-6 Luna and Jev
The two models return essentially consistent results for the same set of questions: in testing with the same refund ticket, both identified it as a refund request and assigned it to billing.
Quick start
https://api.ofox.ai/v1openai/gpt-6-luna/v1/decisionsPOSTWhen calling through the official OpenAI Python SDK, install a version that includes client.decisions (pip install -U openai; 3.31.0 has been tested and works). For how to create an API key, see Jev · Quick start.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.ofox.ai/v1", api_key=os.environ["OFOX_API_KEY"])
r = client.decisions.create(
model="openai/gpt-6-luna",
input="Customer message: I was charged twice and need a refund today.",
questions=[
{"type": "predicate", "name": "refund", "instructions": "Is the customer asking for a refund?"},
{
"type": "choice",
"name": "team",
"instructions": "Which team should handle this ticket?",
"choices": [
{"value": "billing", "description": "Charges, invoices, refunds"},
{"value": "technical", "description": "Outages, errors, integration issues"},
{"value": "other", "description": "None of the above"},
],
},
],
)
refund, team = r.answers
print(refund.probability, team.choice, team.confidence)Output:
1.0 billing 1.0Image decisions
To send an image, input must be a message array, with the image passed in content as input_image using a base64 data URL. An input_text part describing the source of the image can be included at the same time.
import base64
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.ofox.ai/v1", api_key=os.environ["OFOX_API_KEY"])
with open("product.jpg", "rb") as f:
image = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
r = client.decisions.create(
model="openai/gpt-6-luna",
input=[{
"role": "user",
"content": [
{"type": "input_text", "text": "Product image uploaded by a user"},
{"type": "input_image", "image_url": image},
],
}],
questions=[
{"type": "predicate", "name": "has_text", "instructions": "Does the image contain any text?"},
{
"type": "choice",
"name": "shape",
"instructions": "What shape is on the left side of the image?",
"choices": [{"value": "circle"}, {"value": "square"}, {"value": "triangle"}, {"value": "other"}],
},
],
)
for a in r.answers:
print(a.name, getattr(a, "probability", None) or a.choice)
print(r.usage.prompt_tokens)Output:
has_text 1.0
shape circle
538The sample image shows a red circle, a blue square, and a line of text on a white background; both questions were answered correctly. For field definitions, see Decisions API · Input format.
Question design and production readiness
The following sections of the Jev documentation also apply to GPT-6 Luna:
- Question design: options must cover every case, each option should have a description, each question should have a
name, and the meaning of the response fields. - Production readiness: setting confidence thresholds with human-labeled samples, and combining multiple questions into one request.
Billing
The decision mode and the chat mode are billed separately; decision mode rates are listed on the model page . In testing, the usage returned by decision requests contains only prompt_tokens (including the image portion) and does not contain completion_tokens.
Common errors
For error messages and resolutions, see Jev · Common errors and Decisions API · Common errors. Errors related to image input to Jev do not apply to GPT-6 Luna.
Official documentation
FAQ
How does the decision mode of GPT-6 Luna differ from the chat mode?
The decision mode is called through /v1/decisions, answers only within the given options and levels, and returns probabilities and confidence. The chat mode is called through /v1/chat/completions or /v1/responses and generates text answers. The two modes are billed separately.
When should GPT-6 Luna be chosen, and when Jev?
Choose GPT-6 Luna when decisions about images are required; choose Jev when only text or JSON is processed and response speed is a priority. Both use the same request format and question types, so switching requires changing only model.
Can GPT-6 Luna be called with the TypeSafe SDK?
Yes. In testing, both /typesafe/v1/systemone and /openai/v1/decisions can call openai/gpt-6-luna, in the same way as Jev.