OpenAI announced GPT-6 Astra on 3 September 2026. The API id is gpt-6-astra; API customers could call it on 4 September. Most “how do I call it” searches are not about the $10/$50 list price or the 1.05 million token window. They stall on something smaller: ChatGPT already shows GPT-6 Pro, but Python returns model_not_found; or last year’s Chat Completions snippet is pasted unchanged and the first tools field returns 400. This article does not retell what Astra is—that lives in the release, pricing, and agent guide. It takes you from an API key to the first printed output_text.
Why the first request usually fails
The old habit is to swap the model string the day a flagship ships. The new habit is to line up four facts: a paid project, a key that lives only in the environment, the correct endpoint, and a pinned model id plus effort. The split is not whether you can construct OpenAI(). It is whether you still treat the ChatGPT window and the API project as one system.
Five failure paths are unrelated and often stacked. First, Plus or Pro can chat with GPT-6 Pro without the project on platform.openai.com having Astra. Second, enterprise workspaces disable the model by default; the SDK does not say “ask your admin,” it says the model is unavailable. Third, the free API tier does not support Astra—do not debug the SDK until billing exists. Fourth, current guidance keeps plain text on Chat Completions if you must, but tool calling belongs on Responses. Fifth, keys pasted into source, notebooks, or chat logs produce sudden 401s after rotation.
The knowledge cutoff is 30 April 2026. reasoning.effort accepts low, medium, high, xhigh, and max. It does not accept none; that value returns 400. Gateways often default to low. Use low for the first ping. You are proving a path, not burning max reasoning on “hello.”
Rate limits follow usage tier. Official tables list Free as unsupported; Tier 1 starts around 500 RPM and 500,000 TPM and climbs as spend grows. If the first call 429s, check the project’s tier and any organization-wide budget cap before you rewrite the client. A key created in the wrong project looks like a networking bug and is not one.
Classify the key, the endpoint, and the model id
Split the names you hear into four layers so “I am logged into ChatGPT” stops meaning “I can hit the API.”
| Layer | What you hear | What the first request actually needs |
|---|---|---|
| Product door | ChatGPT / API / Azure / Bedrock | This tutorial uses the OpenAI API; clouds need their own SDK and deployment name |
| Secret | User key / project key | Create it in a paid project; environment only; never source |
| Endpoint | Responses / Chat Completions / Batch | New apps: Responses; legacy text: Completions; offline volume: Batch |
| Model | GPT-6 / Astra / GPT-6 Pro / Ultra | Send gpt-6-astra; pin a catalog snapshot in production |
Shortest path to a key: open platform.openai.com, confirm the organization and project have billing and are not on the free tier, create a key scoped to this laptop or this CI job, and copy it once—the UI will not show the full value again. On Windows use the system store or a secret manager; on macOS and Linux use export. Do not paste the key into a teammate’s chat, and do not let Jupyter echo it in a saved output cell.
# macOS / Linux export OPENAI_API_KEY="sk-..." # never commit the key echo 'OPENAI_API_KEY=sk-...' >> .env echo '.env' >> .gitignore
Install the official openai package. An old client may not expose client.responses at all. That failure looks like “Astra is closed” and is actually a Completions-only SDK.
python3 -m pip install -U "openai>=1.0" python3 -c "import openai; print(openai.__version__)"
At launch the model accepts text and image input and text output. Audio and video input are not open. Responses tools include web search, file search, image generation, code interpreter, hosted shell, apply patch, Skills, computer use, MCP, and tool search. Function calling and structured output are supported; fine-tuning is not. All of that sits on top of a working text ping. Do not attach computer use on step one.
Responses versus Chat Completions
The asymmetric line: plain text can use either door; tools, hosted capabilities, and async tool calls require Responses. Do not weld a new agent to Completions because you already know the messages array.
| Capability | Responses API | Chat Completions | Batch / Flex |
|---|---|---|---|
Plain-text gpt-6-astra | Supported; default for new apps | Supported; fine for a legacy text path | Supported; 50% of standard |
| Function calls / structured output | Supported; recommended door | Not the default for a new Astra tool loop | Follow batch rules |
| Hosted tools (search, shell, computer use) | Supported | Not the primary path | Wrong for interactive desktop work |
| Streaming | Supported | Supported | Not for a live terminal |
| First probe | Recommended | Only if the gateway cannot leave Completions | Do not use this to test a key |
List price remains $10 per million input tokens and $50 per million output; cached input is $1 and cache writes are $12.50. Context is 1,050,000 tokens with 128,000 max output. Prompts over 272K input bill the whole request at 2× input and cache and 1.5× output. Fast mode is 2× the applicable rate. Search and computer use add per-call tool fees. A one-sentence low-effort ping should be cheap enough to ignore. If the first call looks like a long-context eval, you wrote a benchmark, not a probe.
The tool loop is still the same protocol: the model emits a structured request; your runtime performs the side effect. If three vendor JSON dialects still live in business if/else, collapse an internal ToolCall first. See the function-calling protocol comparison. For routing against Gemini and the previous GPT line, use the Gemini 4 vs GPT-5.6 guide.
Minimal Python: key to first request
The script below does three things: read the environment, pin gpt-6-astra, and spend low effort on one confirmation sentence. Success is not prose quality. Success is printing output_text and response.id. Keep the id. “I think it worked” is not an incident artifact.
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-6-astra",
instructions="You are a concise engineering assistant.",
input="Reply with one sentence: Astra API is reachable.",
reasoning={"effort": "low"},
)
print(response.output_text)
print(response.id)
print(getattr(response, "usage", None))
If a legacy gateway can only emit a messages array, a text probe may use Chat Completions. That proves the key and model id. It does not prove you can attach hosted shell later.
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-6-astra",
messages=[
{"role": "system", "content": "You are a concise engineering assistant."},
{"role": "user", "content": "Reply with one sentence: Astra API is reachable."},
],
)
print(completion.choices[0].message.content)
Streaming is an optional second step, not the first lesson. Land a non-streaming call, then set stream=True. Event type names follow the SDK you installed. The snippet reads the common response.output_text.delta increment. If the field differs, print event.type and match the official event table instead of guessing.
from openai import OpenAI
client = OpenAI()
stream = client.responses.create(
model="gpt-6-astra",
input="List three safe checks before a production cutover.",
reasoning={"effort": "low"},
stream=True,
)
for event in stream:
if getattr(event, "type", "") == "response.output_text.delta":
print(event.delta, end="", flush=True)
Do not retry every error. Connection failures belong to network and proxy. 429s belong to Retry-After and the usage tier. 400s are usually a bad model id, a bad effort value, or a bad schema—ten thousand retries will not heal them. 401 and 403 send you back to the project switch and the key’s scope. When the free tier or an enterprise lock is the cause, do not silently swap models in application code. That is how production follows an old flagship without anyone noticing.
from openai import APIConnectionError, APIStatusError, OpenAI, RateLimitError
client = OpenAI()
try:
client.responses.create(
model="gpt-6-astra",
input="ping",
reasoning={"effort": "low"},
)
except APIConnectionError as exc:
print("network", exc)
except RateLimitError as exc:
print("rate_limit", exc)
except APIStatusError as exc:
print(exc.status_code, exc.message)
How to choose
| If you are | Choose | Why |
|---|---|---|
| Proving a key and model id for the first time | Responses + gpt-6-astra + effort low | Shortest path, cheapest bill, richest debug fields |
| Stuck on a messages-only gateway | Chat Completions for the text probe only | Proves access; new tool work still moves to Responses |
| Adding functions, search, shell, or computer use | Responses, not a Completions weld | Hosted tools sit on Responses |
| Offline evals you can delay | Batch / Flex | Half price; wrong for “I need the first sentence now” |
| About to edit a repo, run tests, or drive a browser | Any text path + an isolated Mac | The missing piece is the execution boundary |
| Doing exploit-style security research | Do not use the public model for attack proofs | It will refuse; use the reviewed channel |
Recommended stacks
A — Solo developer: local environment variable, official SDK, one Responses script. Default low. Turn on streaming only after that path is boringly reliable. Keep the API key off the ChatGPT login. Daily completions can stay on a cheaper model; Astra is for retries that already failed and for long work.
B — Small-team gateway: project-scoped keys; CI gets its own read-only secret. Pin gpt-6-astra and a snapshot in config. Do not follow a floating “latest flagship” alias. Chat stays cheap; coding and computer-use routes take Astra. Collapse the tool JSON protocol before you attach hosted tools.
C — Enterprise: an admin enables the workspace switch first; zero-data-retention is a separate ask for eligible customers. Budget alerts are per project. Long prompts force a cache prefix and watch the 272K whole-request uplift. Write-capable sessions land on a disposable remote Mac with a path allowlist. Delivery and account edges are in the help center; monthly node cost is on Mac mini pricing.
Common pitfalls
- Treating GPT-6 Pro in ChatGPT as proof the API is open.
- Putting the key in source, notebook output, or a group chat, then calling the model “flaky.”
- Setting
effort=maxor stuffing half a monorepo into the first ping, then paying long-reasoning and 272K rates. - Welding a new tool loop to Chat Completions until every hosted-shell call is 400.
- Sending
gpt-6,chatgpt-6, or a rumored Ultra id.
Action plan: 7 steps
- Confirm the API project has billing and is not on the free tier; enterprises ask an admin to enable Astra.
- Create a platform key, store it only in the environment or a secret manager, and add
.envto.gitignore. - Install a current
openaiSDK and confirmclient.responses.createexists. - Send a one-sentence Responses request with
model="gpt-6-astra"andreasoning.effort="low". - Print
output_text,response.id, and usage; keep the id for later reconciliation. - After the text path is stable, add streaming or tools; match tool JSON against the function-calling article.
- Put sessions that edit files, run commands, or open a browser on an isolated remote Mac and destroy the workspace when the session ends.
FAQ
ChatGPT already shows GPT-6 Pro. Why does Python fail?
ChatGPT and the API are separate bills and gates. Enterprise workspaces disable Astra by default. The free API tier does not support the model. Create a key in a paid project on platform.openai.com.
Should the first request use Responses or Chat Completions?
Plain text works on both. New apps should default to Responses. Function calls, hosted tools, structured output, and async tools require Responses.
What model id should I send?
Use gpt-6-astra. Pin a dated snapshot from the official catalog in production. Do not invent gpt-6, chatgpt-6, or an Ultra SKU.
Can reasoning.effort be none?
No. Astra accepts low, medium, high, xhigh, and max. none returns HTTP 400. Use low for the first ping.
May I hard-code the API key?
No. Use an environment variable or a secret manager. Never commit the key. Revoke it immediately if it leaked.
Conclusion
The first GPT-6 Astra lesson is not flagship worship. It is lining up four facts: a paid project, a key that never enters source control, Responses (or the Completions text path you are forced to keep), and a pinned gpt-6-astra. The first request is one sentence at low effort. The path exists only after output_text prints. Tools, long context, and computer use are the next lesson, and they belong on a disposable host. When you need a stable remote Mac, start from the rental page and pricing page; account issues go to the help center.
Further reading
- What is GPT-6 Astra: release, price, agents →
- Function calling and JSON tool protocols →
- Gemini 4 vs GPT-5.6 for developers →
Move the first successful call onto a disposable Cloud Mac before tools
A text ping can run on your laptop. Hosted shell, apply patch, and computer use should not share your daily desktop. Remote Mac nodes isolate a workspace per session so Astra can go from reachable to allowed-to-edit.