---
title: "GPT-6 Luna"
description: "A closed-weights OpenAI model released September 2026, priced near the bottom of the registry. It stands out on competition and research mathematics, and is weaker on chat and agent-style tasks."
canonical: https://pydantic.dev/models/list/gpt-6-luna/
---

# GPT-6 Luna

> A closed-weights OpenAI model released September 2026, priced near the bottom of the registry. It stands out on competition and research mathematics, and is weaker on chat and agent-style tasks.
>
> Markdown copy of https://pydantic.dev/models/list/gpt-6-luna/. Index for agents: https://pydantic.dev/models/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five are tools of the MCP server at `https://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

Use it with Pydantic AI as `gateway/openai:gpt-6-luna`.

## Spec sheet

- **Family:** OpenAI
- **Released:** 22 Sept 2026
- **Weights:** closed
- **Context window:** 1,050,000 tokens
- **Largest response:** 128,000 tokens
- **Accepts:** text, image, file
- **Tool calling:** yes
- **Knowledge cutoff:** 2026-05
- **Intelligence index:** 57.9 (rank 52)
- **Scores updated:** 2026-11-30
- **Price:** $0.1 input, $0.5 output, $0.2 blended per 1M tokens
- **Index points per $:** 289.5 (rank 5)
- **Speed:** 76 tokens/sec (rank 76)
- **Popularity:** rank 3 of 194 by usage
- **Pydantic AI Gateway:** built in

## Benchmarks

### Pydantic AI benchmarks

Our own benchmarks, each about 10 tasks run once with tool calling and once in code mode (https://pydantic.dev/models/codemode.md). Not part of the intelligence index. Cost is the mean cost of one task. For the combined score, code mode is compared over the four benchmarks run in both modes.

| Benchmark                                                                                      | Tool calling | Code mode | Change | Cost per task | Cost per task, code mode | Rank     | Runs                                                             |
| ---------------------------------------------------------------------------------------------- | ------------ | --------- | ------ | ------------- | ------------------------ | -------- | ---------------------------------------------------------------- |
| [Pydantic AI Combined](https://pydantic.dev/models/benchmarks/pydantic_ai.md)                  | 58.4%        | 54.8%     | −0.3   | $0.0078       | $0.012                   | 31 of 44 | https://pydantic.dev/models/list/gpt-6-luna/pydantic_ai.md       |
| [Pydantic AI - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 40%          | 80%       | +40    | $0.0043       | $0.0034                  | 38 of 44 | https://pydantic.dev/models/list/gpt-6-luna/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 30%          | 40%       | +10    | $0.0013       | $0.0020                  | 33 of 44 | https://pydantic.dev/models/list/gpt-6-luna/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 80%          | 40%       | −40    | $0.018        | $0.028                   | 16 of 44 | https://pydantic.dev/models/list/gpt-6-luna/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 70.4%        | 59.3%     | −11.1  | $0.020        | $0.015                   | 28 of 44 | https://pydantic.dev/models/list/gpt-6-luna/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 90%          | –         | –      | $0.0027       | –                        | 15 of 44 | https://pydantic.dev/models/list/gpt-6-luna/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 40%          | –         | –      | $0.0006       | –                        | 41 of 44 | https://pydantic.dev/models/list/gpt-6-luna/llm_judge.md         |
| [Pydantic AI - Cyber Willing](https://pydantic.dev/models/benchmarks/cyber_willing.md)         | 94.4%        | –         | –      | $0.0013       | –                        | 7 of 32  | https://pydantic.dev/models/list/gpt-6-luna/cyber_willing.md     |

### Other benchmarks


| Benchmark                | Score  | Rank among models tested | What it measures                                                                                 | Source                                    |
| ------------------------ | ------ | ------------------------ | ------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| Intelligence index       | 57.9   | 52                       | Our composite of the benchmarks below, 0-100                                                     | Pydantic, from the sources credited below |
| GPQA Diamond             | 90.5%  | 39                       | Graduate-level science questions, multiple choice                                                | Epoch AI (CC BY 4.0)                      |
| OTIS Mock AIME           | 98.9%  | 21                       | Competition mathematics problems with exact answers                                              | Epoch AI (CC BY 4.0)                      |
| FrontierMath             | 78.9%  | 23                       | Original research-level mathematics problems, tiers 1 to 3                                       | Epoch AI (CC BY 4.0)                      |
| ARC-AGI-2                | 59.3%  | 39                       | Abstract visual puzzles that test learning a new rule from a few examples                        | ARC Prize, via Epoch AI (CC BY 4.0)       |
| SimpleQA Verified        | 41.4%  | 45                       | Short factual questions answered from memory, without search                                     | Epoch AI (CC BY 4.0)                      |
| SciCode                  | 54.6%  | 32                       | Scientific programming problems written by researchers                                           | SciCode, via Epoch AI (CC BY 4.0)         |
| APEX-Agents              | 44.3%  | 43                       | Long professional tasks (banking, consulting, law) passed on the first attempt                   | Mercor, via Epoch AI (CC BY 4.0)          |
| LMArena text             | 1390.6 | 99                       | Rating from blind human votes between pairs of chat responses                                    | LMArena (CC BY 4.0)                       |
| FrontierMath Tier 4      | 56.1%  | 23                       | Research-level mathematics problems, the hardest tier, with checkable answers                    | Epoch AI (CC BY 4.0)                      |
| Chess Puzzles            | 36%    | 45                       | Find the single best move in a chess position                                                    | Epoch AI (CC BY 4.0)                      |
| Mystery Game Puzzles     | 7%     | 70                       | Best-move puzzles in an undisclosed well-known game                                              | Epoch AI (CC BY 4.0)                      |
| Furniture Assembly       | 44.2%  | 19                       | Spot assembly mistakes in photos of flat-pack furniture builds                                   | Epoch AI (CC BY 4.0)                      |
| ALE-Bench                | 1576.9 | 27                       | Hard optimisation contest problems, as a rating against human contestants                        | Sakana AI, via Epoch AI (CC BY 4.0)       |
| Browser Use Bench        | 69.2   | 13                       | Tasks on live websites, scored 0-100 against a weighted rubric by an LLM judge                   | Browser Use, with permission              |
| Epoch Capabilities Index | 156.4  | 38                       | Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index | Epoch AI (CC BY 4.0)                      |

## Providers and prices

US dollars per million tokens.

| Provider    | Gateway  | Pydantic AI string                         | Input | Cached input | Output |
| ----------- | -------- | ------------------------------------------ | ----- | ------------ | ------ |
| OpenAI      | built in | `gateway/openai:gpt-6-luna`                | $0.1  | $0.01        | $0.5   |
| AWS Bedrock | built in | `gateway/bedrock:global.openai.gpt-6-luna` | $0.1  | $0.01        | $0.5   |
| OpenRouter  | BYOK     | `openrouter:openai/gpt-6-luna`             | $0.1  | $0.01        | $0.5   |

## Use GPT-6 Luna with Pydantic AI

### hello.py

Ask GPT-6 Luna a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/openai:gpt-6-luna', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)
```

### structured_output.py

Get validated, typed output from GPT-6 Luna by giving the agent a Pydantic model. Run it with uv run structured_output.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic import BaseModel
from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('gateway/openai:gpt-6-luna', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give GPT-6 Luna two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os
import random

from pydantic_ai import Agent, RunContext

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent(
    'gateway/openai:gpt-6-luna',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream GPT-6 Luna's reply to the terminal as it is generated. Run it with uv run streaming.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import asyncio
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/openai:gpt-6-luna')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Code with GPT-6 Luna in your terminal using Pax, the Pydantic AI coding agent. On macOS, open a new terminal after installing, so pax isn't the system's archiver.

```sh
# uv tool install pydantic-ai-pax
export PYDANTIC_AI_GATEWAY_API_KEY='...'

pax -m 'gateway/openai:gpt-6-luna'
```

### codex.sh

Run OpenAI's Codex CLI on GPT-6 Luna through Pydantic AI Gateway.

```sh
# npm install -g @openai/codex
export PYDANTIC_AI_GATEWAY_API_KEY='...'

codex --model 'gpt-6-luna' \
  -c model_provider='gateway' \
  -c model_providers.gateway.name='Pydantic AI Gateway' \
  -c model_providers.gateway.base_url='https://gateway.pydantic.dev/proxy/openai/v1' \
  -c model_providers.gateway.env_key='PYDANTIC_AI_GATEWAY_API_KEY'
```

### ai_sdk.ts

Call GPT-6 Luna from TypeScript with the Vercel AI SDK, through Pydantic AI Gateway.

```ts
// npm install ai @ai-sdk/openai
import { createOpenAI } from '@ai-sdk/openai'
import { generateText } from 'ai'

process.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'

const openai = createOpenAI({
  baseURL: 'https://gateway.pydantic.dev/proxy/openai',
  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,
})

const { text } = await generateText({
  model: openai('gpt-6-luna'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About GPT-6 Luna

GPT-6 Luna costs $0.1 per million input tokens and $0.5 per million output tokens, has a 1.1M token context window and scores 57.9 on our intelligence index, #52 of 101.

GPT-6 Luna is a closed-weights model from OpenAI, released September 2026 with a knowledge cutoff of May 2026. It accepts text, image and file input and supports tool calling, reasoning mode and structured output. It has a 1.05M token context window and can return up to 128k tokens. It is offered through OpenAI, AWS Bedrock and OpenRouter, and is built into the Pydantic AI Gateway.

Its main appeal is cost. A blended price of $0.20 per million tokens is well under the registry median, which places it fifth of 194 on intelligence per dollar. Its overall intelligence index of 59.9 sits just above the median. Its strongest results are in competition and research mathematics, including 98.9% on OTIS Mock AIME and 78.9% on FrontierMath, both above the median. It ranks lower on ARC-AGI-2, APEX-Agents and LMArena text, where it sits in the bottom part of the registry.

**Strengths**

- Blended price of $0.20 per million tokens, far below the registry median
- 98.9% on OTIS Mock AIME, 22nd of 95
- 78.9% on FrontierMath, 23rd of 80
- 1M context window with up to 128k response tokens

**Weaknesses**

- LMArena text rating 1390.6, 99th of 114 and below median
- APEX-Agents 44.3%, 45th of 60 and below the 54.3% median
- ARC-AGI-2 59.3%, 40th of 68 and below the 61.3% median

**Best for:** Cost-sensitive math, science and coding tasks where long context and structured output matter more than agent or chat quality.

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model's pass rate depends on the task and the mode. Tool calling did well on document extraction (Structured output 90%) and SQL data analysis (80%). Code mode did better on Billing ops (80% against 40%) because it computed and matched records in Python. Its main recurring weaknesses are stopping after a sample of the data, accepting checks or answers it should have questioned, and asking too few clarifying questions.

#### Strengths
- In Structured output it scaled £000 filings correctly, handled bracketed signs, and kept near-identical group and parent columns apart, including two tier 5 cases with roughly 150 fields each.
- In Billing ops it passed all write tasks in both modes, with correct operation order, today's date, and oldest-due-first payment allocation net of existing allocations.
- In Research & deck both decks passed `check_deck` on the first write and used no planted values, with caveats added for unaudited figures.
- In SQL data analysis it modelled previous-service-day shifts, repeat runs, walk limits and change margins correctly, and caught its own errors such as a 439 m walk and negative arrival times.
- In LLM Judge it disagreed with the majority only once in 24 key-point verdicts and checked replies against account data such as an empty integrations list.

#### Weaknesses
- In Billing ops tool mode it opened only 1, 11 and 4 of 384 invoices on the large audits before answering, and it summed margins by hand incorrectly (118,416 vs 120,741).
- In SQL data analysis it tested for untimed calls with `=''` instead of `IS NULL`, so it skipped interpolation in 6 runs, 5 of which failed.
- In LLM Judge it was too strict on `no_false_promise`, treating ordinary statements and offers as promises, which caused 4 of its 6 failures.
- In Research & deck it asked the founder one or two questions, all before reading the data room, and in code mode it guessed colours and slide order instead of asking.
- In Structured output its one failure came from subtracting a director-loan figure mentioned in narrative text instead of returning the line as printed.

#### Tool calling compared with code mode
- In Billing ops code mode passed 80% against 40% with tools, because arithmetic and matching ran in Python and all invoices were fetched in batches, and it was also cheaper ($0.034 vs $0.043).
- In SQL data analysis code mode passed half as often (40% vs 80%) at about 1.5 times the cost, mostly because it wrapped single SQL calls and hit sandbox memory, nested-call and timeout limits.
- In Research & deck code mode scored lower on the brief (59% vs 70%) because it asked one question instead of two, though it cost less and checked figures with SQL.
- Across Billing ops and SQL data analysis the 100-nested-call sandbox limit was hit repeatedly on large data, forcing resets and re-fetches.
- In Structured output and LLM Judge only tool calling was run, each case taking a single request.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0), Browser Use, and our own Pydantic AI benchmarks (CC BY 4.0); the index and its sources are described at https://pydantic.dev/models/methodology.md. Data built 2026-11-30. This model from the API: `https://pydantic.dev/models/api/models/gpt-6-luna`. Compare it with others: `https://pydantic.dev/models/api/models?slug=gpt-6-luna,<other slug>`
