# GPT-6 Luna decisions: how to make image and text decisions Source: https://ofox.ai/docs/develop/models/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](https://ofox.ai/docs/develop/models/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](https://ofox.ai/docs/develop/models/gpt). ## Choosing between GPT-6 Luna and Jev **Key point**:Use GPT-6 Luna when decisions about images are required; use Jev when only text or JSON is processed and response speed is a priority. | | GPT-6 Luna | Jev | |---|---|---| | Model ID | `openai/gpt-6-luna` | `typesafe/jev-latest` | | Input | Text, images | Text, JSON | | Question types | predicate, choice, score | predicate, choice, score | | Call paths | `/v1/decisions`, `/openai/v1/decisions`, `/typesafe/v1/systemone` | Same as GPT-6 Luna | | Latency per request (measured) | About 0.5 seconds (the first request may take about 2.5 seconds) | About 0.3 seconds | 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 **Connection details** - Base URL: `https://api.ofox.ai/v1` - Model ID: `openai/gpt-6-luna` - Endpoint: `/v1/decisions` — POST When 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](https://ofox.ai/docs/develop/models/jev#quickstart). ```python filename="luna_text.py" showLineNumbers 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: ```text 1.0 billing 1.0 ``` ## Image 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. ```python filename="luna_image.py" showLineNumbers 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: ```text has_text 1.0 shape circle 538 ``` The 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](https://ofox.ai/docs/api/decisions#input). ## Question design and production readiness The following sections of the Jev documentation also apply to GPT-6 Luna: - [Question design](https://ofox.ai/docs/develop/models/jev/writing): 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](https://ofox.ai/docs/develop/models/jev/production): 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](https://ofox.ai/models/openai/gpt-6-luna). 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](https://ofox.ai/docs/develop/models/jev#errors) and [Decisions API · Common errors](https://ofox.ai/docs/api/decisions#errors). Errors related to image input to Jev do not apply to GPT-6 Luna. ## Official documentation - [OpenAI · Decisions](https://developers.openai.com/api/docs/guides/decisions) ## 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.