For the complete documentation index, see llms.txt. This page is also available as Markdown.

GPT-6 Luna

This documentation is valid for the following list of our models:

  • openai/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.

How to make the first API call

1️⃣ Required setup (don’t skip this) ▪ Create an account: Sign up on the AI/ML API website (if you don’t have one yet). ▪ Generate an API key: In your account dashboard, create an API key and make sure it’s enabled in the UI.

2️ Copy the code example At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.

3️ Update the snippet for your use case ▪ Insert your API key: replace <YOUR_AIMLAPI_KEY> with your real AI/ML API key. ▪ Select a model: set the model field to openai/gpt-6-luna. ▪ Provide input: put the content to evaluate in input and the questions in questions.

4️ (Optional) Tune the request See the API schema below for the three question types (predicate, choice, score) and prompt_cache_key.

5️ Run your code Run the updated code in your development environment.

API Schema

post
Body
modelstring · enumRequiredPossible values:
inputany ofRequired

Shared evidence for every question: a text string, or user/system/developer/assistant messages. User messages may combine input_text and input_image parts.

Example: I was charged twice for my order.
string · min: 1 · max: 1048576Optional
or
prompt_cache_keystring · max: 64Optional

Partitions prompt cache reuse by a key you choose.

Responses
200Success
application/json
or
post/v1/decisions
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"
}
200Success
{
  "model": "text",
  "answers": {
    "ANY_ADDITIONAL_PROPERTY": {
      "type": "noul",
      "noul": 1
    }
  },
  "usage": {
    "input_tokens": 1,
    "output_tokens": 1
  }
}

Code Example

Response

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.

  • predicate returns probability: how likely the condition is true, 0–1.

  • choice returns the winning value in choice, a confidence, and probabilities as an array of {value, probability} that sums to 1.

  • score returns score, the probability-weighted level index starting at 0 — 1.01 above means "Frustrated" with a trace of "Very angry" — plus probabilities as {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?