Blog

How to Use GPT-6 Astra in Codex, Cursor, and Claude Code

Last updated: 2026-09-17 — GPT-6 Astra shipped on September 3, 2026. This setup guide was written before launch; every config now uses the confirmed model ID gpt-6-astra, and the coding-benchmark FAQ reflects the published scores. Specs and background: What Is GPT-6 Astra.

Quick Answer

GPT-6 Astra shipped on September 3, 2026, and using it in Codex, Cursor, or Claude Code is the same OpenAI-compatible setup as GPT-5.6: point base_url at an OpenAI-compatible gateway, add your key, set the model name to gpt-6-astra. These tools don't need to know anything about "Astra" — they only speak the OpenAI-compatible contract and pass the model ID through. With Moyi API, one key switches between GPT-6, Claude, and DeepSeek.

Why It Works Everywhere

Codex, Cursor, Claude Code, and Cline all abstract the "model provider" as an OpenAI-compatible endpoint. Give them a base_url that responds plus a valid model name, and they work. So "connecting Astra" = "provide an OpenAI-compatible entry + tell it the model name."

Cursor

Cursor → Settings → Models → enable OpenAI API Key, then fill in:

text
Base URL: https://api.moyiapi.com/v1
API Key:  sk-moyiapi-xxxxxx

Enter gpt-6-astra in the model list — that is the official API model ID. The same config also runs GPT-5.6 Sol if you switch the model name.

Claude Code

Switch the provider via environment variables:

bash
export ANTHROPIC_BASE_URL="https://api.moyiapi.com/v1"
export ANTHROPIC_AUTH_TOKEN="sk-moyiapi-xxxxxx"

Or specify the model directly with claude --model gpt-6-astra. Claude Code's provider abstraction is OpenAI-compatible too — change base_url + model and you're done. If you're also routing Claude's own flagship through the same key, the Claude Fable 5.1 API guide covers that side.

Codex

toml
# ~/.codex/config.toml
model = "gpt-6-astra"          # the official API model ID
model_provider = "openai"

Or env vars:

bash
export OPENAI_BASE_URL="https://api.moyiapi.com/v1"
export OPENAI_API_KEY="sk-moyiapi-xxxxxx"

Route by Task, Don't Lock One Model

Once connected, the pragmatic pattern is task-based routing, not "Astra everywhere":

Task Model
Complex refactor, hard bug, architecture GPT-6 Astra / Claude
Daily completion, simple Q&A GPT-5.6 Terra / DeepSeek
Batch generation, low-value GPT-5.6 Luna / DeepSeek V4 Flash

One gateway key makes this a model string change across tools — no per-provider accounts, top-ups, or configs. Astra on simple tasks is just wasted money (the GPT-6 Astra pricing breakdown shows why).

If you're new to calling Astra itself, start with How to use GPT-6 Astra, then come back to the per-tool configs above.

FAQ

Q: Do these tools need a version upgrade for Astra? Usually not — they speak the generic OpenAI-compatible protocol. Some may require manually entering a "custom model name" in the list.

Q: Will Claude Code treat an OpenAI-model as Claude? No. You're explicitly setting the provider via base_url, and the model name is passed through as you configure it.

Q: Is Astra actually better at coding? On OpenAI's own table, slightly: 74.1% on DeepSWE v1.1 versus 72.7% for GPT-5.6 Sol — vendor-reported and within run-to-run noise on real codebases. Independent coding results against Claude Fable 5.1 are mixed (see GPT-6 Astra benchmarks). Test it on your own repo before making it the daily driver.

Summary

Codex / Cursor / Claude Code connect to GPT-6 Astra with three fields: Base URL, API Key, Model ID. Astra shipped on September 3, 2026, so one multi-model key and the model ID gpt-6-astra are all you need today. Sign up for Moyi API and flip between GPT-6, Claude, and DeepSeek in every tool.

Get Started

Create your key at Moyi API and set base_url to https://api.moyiapi.com/v1.

Ready to connect?Log in · top up · create an API key — three steps to start.
How to Use GPT-6 Astra in Codex, Cursor, and Claude Code · Moyi API