Models

gpt-6-luna — API, Pricing & Context Window | Vivgrid

gpt-6-luna on Vivgrid: OpenAI's fast, low-cost gpt-6 model with a 1.05M-token context window for high-volume agent workloads.

gpt-6-luna is the fast, low-cost model in OpenAI's gpt-6 family. It keeps the generation's 1.05M-token context window and 128K-token max output at $0.10 per 1M input tokens, making it the cheapest way on Vivgrid to run long-context agents at scale.

On Vivgrid, gpt-6-luna is served through a single OpenAI-compatible endpoint with geo-distributed acceleration across AMER, EMEA, and APAC, reachable with the same unified key as the rest of the catalog. It is available on both Chat Completions (/chat/completions) and the Responses API (/responses).

Specifications

ProviderOpenAI
Model IDgpt-6-luna
Best forGeneral-purpose
Available onChat Completions, Vibe coding
Context window1,050,000 tokens
Max output128,000 tokens
ModalitiesText, Image
Tool / function callingYes
Knowledge cutoff2026-05
Acceleration⚡ Geo-Distributed — AMER, EMEA, APAC

Pricing

Pricing in USD per 1M tokens.

InputCached inputOutput
$0.10$0.01$0.50

What one request costs

The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.

RequestCost
Cold prompt, nothing cached$0.00300
Warm prompt, 90% of the input served from cache$0.00138

Prompt caching is billed at $0.125 per 1M cache-write tokens, with cached reads at $0.01.

Requests beyond 272K input tokens are billed at the long-context rate: $0.20 input / $0.02 cached input / $0.25 cache write / $0.75 output per 1M tokens.

Use gpt-6-luna in your coding agent

gpt-6-luna works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.

Codex

Install Codex:

npm i -g @openai/codex

Add Vivgrid as a provider and make gpt-6-luna the default model in ~/.codex/config.toml. Codex talks to Vivgrid over the Responses API:

~/.codex/config.toml
model = "gpt-6-luna"
model_provider = "vivgrid"
preferred_auth_method = "apikey"
forced_login_method = "api"

[features]
streamable_shell = true
unified_exec = true
shell_snapshot = true

[model_providers.vivgrid]
name = "Vivgrid"
base_url = "https://api.vivgrid.com/v1"
wire_api = "responses"
experimental_bearer_token = "viv-xxxxxxxxxxxxx"

Then start Codex in your project:

codex

Already using another Vivgrid model in Codex? Switch for a single run with codex -m gpt-6-luna. See the full Codex tutorial.

OpenCode

OpenCode has Vivgrid built in, so you can use gpt-6-luna without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.

Prefer to configure it by hand? Install OpenCode:

npm i -g opencode-ai

Declare gpt-6-luna under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/openai provider talks to Vivgrid over the Responses API (/v1/responses):

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "vivgrid/gpt-6-luna",
  "provider": {
    "vivgrid": {
      "npm": "@ai-sdk/openai",
      "name": "Vivgrid",
      "options": {
        "baseURL": "https://api.vivgrid.com/v1",
        "apiKey": "{env:VIVGRID_API_KEY}"
      },
      "models": {
        "gpt-6-luna": {
          "name": "gpt-6-luna",
          "tool_call": true,
          "attachment": true,
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1050000, "output": 128000 }
        }
      }
    }
  }
}

Export your key and launch OpenCode:

export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencode

Use /models to switch between gpt-6-luna and other Vivgrid models mid-session. See the full OpenCode tutorial.

Pi

Install Pi:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Add gpt-6-luna to the Vivgrid provider in ~/.pi/agent/models.json. The provider defaults to Chat Completions, and gpt-6-luna overrides api at the model level to use the Responses API (/v1/responses):

~/.pi/agent/models.json
{
  "providers": {
    "vivgrid": {
      "baseUrl": "https://api.vivgrid.com/v1",
      "apiKey": "viv-xxxxxxxxxxxxx",
      "api": "openai-completions",
      "compat": {
        "sendSessionAffinityHeaders": true
      },
      "models": [
        {
          "id": "gpt-6-luna",
          "api": "openai-responses",
          "input": ["text", "image"],
          "contextWindow": 1050000,
          "maxTokens": 128000
        }
      ]
    }
  }
}

Make it the model Pi starts with in ~/.pi/agent/settings.json:

~/.pi/agent/settings.json
{
  "defaultProvider": "vivgrid",
  "defaultModel": "gpt-6-luna"
}

Then verify and start Pi:

pi --list-models vivgrid
pi

Or run a one-shot prompt without entering the TUI:

pi -p "explain the auth flow in this repo" --model vivgrid/gpt-6-luna

See the full Pi tutorial.

API surfaces

The Vivgrid Console catalogs gpt-6-luna on 2 surfaces, all behind the same API key. The endpoint shown is the one the Console previews for that surface.

SurfacePrimary endpointUse it for
Chat Completions/chat/completionsAgent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request.
Vibe coding/responsesCoding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop.

Quick start

Get an API key from the Vivgrid Console, then call gpt-6-luna directly.

/chat/completions

curl https://api.vivgrid.com/v1/chat/completions \
  -H "Authorization: Bearer $VIVGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "messages": [
      { "role": "user", "content": "Say hello in English, Chinese and Spanish." }
    ],
    "stream": true
  }'

/responses

curl https://api.vivgrid.com/v1/responses \
  -H "Authorization: Bearer $VIVGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "input": "Refactor this function and explain the change.",
    "stream": true
  }'

Choosing within the gpt-6 family

Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.

ModelContextMax outputInputOutput
gpt-6-astra1,050,000128,000$10.00$50.00
gpt-6.1-sol1,050,000128,000$2.00$10.00
gpt-6-sol1,050,000128,000$2.00$10.00
gpt-6.1-terra1,050,000128,000$1.10$5.50
gpt-6-luna — this page1,050,000128,000$0.10$0.50

Ideal use cases

  • High-volume agent and content pipelines where cost dominates
  • Long-context retrieval, summarization, and classification
  • Fast interactive assistants and chat products
  • Fallback or draft model alongside gpt-6-sol / astra

On this page