GPT-6 API: how to get a key and call Astra, Sol and Luna
How to access the GPT-6 API: get a key, call GPT-6 Astra, Sol or Luna with the OpenAI SDK, set reasoning effort, stream, send images and avoid common errors.
Read as MarkdownTo call GPT-6, you need an API key from a platform that serves it and a request with model set to gpt-6-astra, gpt-6-sol or gpt-6-luna. OpenAI serves them in its own API and, for GPT-6 Astra, through Microsoft Azure and Amazon Bedrock. SeedRouter serves all three with one key, pay-as-you-go, using the official OpenAI request format: point the OpenAI SDK at https://api.seedrouter.ai/v1 and keep your code.
This guide uses SeedRouter; the request bodies are the same as OpenAI's.
How do I get a GPT-6 API key?
- Sign in to SeedRouter and open API keys.
- Create a key and copy it; it is shown once.
- Add credit when you need it. New accounts start with a small free balance, and there is no subscription.
Keep the key in an environment variable such as SEEDROUTER_API_KEY, and only use it from server-side code.
How do I call GPT-6 from Python?
OpenAI recommends the Responses API for GPT-6. With the official openai package:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["SEEDROUTER_API_KEY"],
base_url="https://api.seedrouter.ai/v1",
)
response = client.responses.create(
model="gpt-6-sol",
input="Summarize the trade-offs of event sourcing in three bullet points.",
)
print(response.output_text)Change model to gpt-6-astra or gpt-6-luna to switch models; nothing else in the request has to change.
How do I call it from Node.js or cURL?
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.SEEDROUTER_API_KEY,
baseURL: "https://api.seedrouter.ai/v1",
});
const response = await client.responses.create({
model: "gpt-6-sol",
input: "Summarize the trade-offs of event sourcing in three bullet points.",
});
console.log(response.output_text);curl https://api.seedrouter.ai/v1/responses \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6-sol", "input": "Summarize the trade-offs of event sourcing in three bullet points."}'Existing Chat Completions code works too: send messages to /v1/chat/completions and set the output limit with max_completion_tokens.
How do I set reasoning effort?
Reasoning effort trades depth for speed and cost. Set it with reasoning.effort in the Responses API or reasoning_effort in Chat Completions:
response = client.responses.create(
model="gpt-6-sol",
input="Find the bug: def avg(xs): return sum(xs) / len(xs)",
reasoning={"effort": "high"},
)| Model | Accepted values | Default |
|---|---|---|
| GPT-6 Astra | low, medium, high, xhigh, max | Not documented |
| GPT-6 Sol | none, low, medium, high, xhigh, max | medium |
| GPT-6 Luna | none, low, medium, high, xhigh, max | medium |
Reasoning tokens are billed as output tokens. none skips reasoning and is the only level that accepts temperature and top_p; GPT-6 Astra does not support it.
How do I stream the answer?
Add stream=True and read the events. The text arrives in response.output_text.delta events, and the final response.completed event carries the token usage:
stream = client.responses.create(
model="gpt-6-luna",
input="Write a haiku about latency.",
stream=True,
)
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)Can I send images?
Yes. All three models read images alongside text. Put an input_image part with a public URL in the user message:
response = client.responses.create(
model="gpt-6-sol",
input=[{
"role": "user",
"content": [
{"type": "input_image", "image_url": "https://example.com/chart.png"},
{"type": "input_text", "text": "What does this chart show?"},
],
}],
)What errors should I expect?
| Error | Cause | Fix |
|---|---|---|
400, max_output_tokens below minimum | The value is under 16 | Use 16 or more; it covers answer and reasoning |
400 on temperature or top_p (Responses API) | Effort is not none | Remove them, or set effort to none on Sol or Luna |
400 on none effort | Sent to GPT-6 Astra | Use low |
| 401 | Missing or wrong key | Check the Authorization header |
Errors return {"error": {"code": ..., "message": "..."}}, and a request that fails is not charged.
Frequently asked questions
Is GPT-6 available in the API?
Yes. OpenAI released GPT-6 Astra in the API on September 3, 2026, and GPT-6 Sol and GPT-6 Luna on September 22, 2026, according to its API changelog.
Do I need an OpenAI account to use GPT-6?
Not on SeedRouter. You sign in to SeedRouter, create a key there, and pay from your SeedRouter balance.
Which GPT-6 model should I start with?
GPT-6 Sol for most coding and agent work, GPT-6 Luna for high-volume, simple tasks, and GPT-6 Astra for the hardest problems. The Astra vs Sol vs Luna guide explains the choice.
Where is the full parameter list?
The API docs for GPT-6 Sol, GPT-6 Luna and GPT-6 Astra list every field, limit and response shape.
Try it before you write code
The GPT-6 Sol playground sends the same request from your browser and shows the raw JSON, the tokens and the cost of every answer.



