ChatGPT API: where to get an OpenAI API key, and an OpenAI-compatible alternative
The ChatGPT API is the OpenAI API: a key, a base_url and a GPT model name. The key comes from OpenAI’s developer platform, not from ChatGPT itself, and a ChatGPT Plus subscription does not include it. Below: the official route, GPT-6 prices, an OpenAI-compatible route through Twelver and what chatgpt.com/api/auth/session is.
Short answer
Officially: platform.openai.com → API keys → Create new secret key, with credits topped up separately from any ChatGPT subscription. Base URL https://api.openai.com/v1, models gpt-6-luna and gpt-6-astra. Through Twelver: the gpt (GPT-6 Luna) and gpt-max (GPT-6 Astra) series, with a key issued on this page with no signup and no card.
GPT-6 models and OpenAI prices
| Model | Input | Cached input | Output |
|---|---|---|---|
| gpt-6-luna | $0.10 | $0.01 | $0.50 |
| gpt-6-astra | $10 | $1 | $50 |
GPT through Twelver
| Series | Model | $ per 1M |
|---|---|---|
| gpt | GPT-6 Luna | 0.163 / 0.813 |
| gpt-max | GPT-6 Astra | 16.25 / 81.25 |
Right here
Base URL and key for GPT
Your own values appear in the block and drop straight into the code below.
Press it and get your base_url and API key.
No sign-up, no card.
Free. Your key appears right here.
gpt.pyThe highlighted parts are stand-ins. The button above issues them in seconds, no sign-up.from openai import OpenAI
client = OpenAI(base_url="https://twelver.ru/api/ai/<your-config-id>/v1", api_key="sk-<your-key>")
reply = client.chat.completions.create(
model="gpt", # GPT-6 Luna; "gpt-max" for the hardest tasks
messages=[{"role": "user", "content": "Where is my order 1024?"}],
)
print(reply.choices[0].message.content)Work out what the requests cost
Pick a workload or type your own numbers — the calculator multiplies them by each series’ rates. A token is roughly 4 characters of English text or code.
gptGPT-6 Luna$6.51 per monthgpt-maxGPT-6 Astra$650 per monthautoQwen3.7-Plus$23.4 per monthzaiGLM-5.3$74.2 per monthTwelver rates as of 4 November 2026; tokens are billed as actually used, caching and discounts not included. The arithmetic runs in your browser.
The model itself: GPT-6 in Twelver. Agent setup: Cline, Kilo Code. Other models: DeepSeek API, Grok API. The whole book: API for AI agents.
Frequently asked questions
Where do I get a ChatGPT API key?
What is chatgpt.com/api/auth/session?
Does ChatGPT Plus include the API?
Is there an OpenAI-compatible alternative?
Try it yourself
Everything in this guide runs inside Twelver
One chat for text, images, video, music and voice — no separate services or subscriptions.
Open Twelver chat