ChatGPT Plus and Pro, as an API
Use your ChatGPT subscription as an API
ChatGPT Plus ($20 a month) includes no API access, and the API credits on Pro ($100, $200 or $500) expire every billing cycle. Plan2API signs in to your ChatGPT plan with a one-time device code and turns its Codex usage into one OpenAI-compatible key, free for 50 requests a day.
- ChatGPT Plus / Pro
- $20 /
$100 to $500 a month - Codex models
- openai/
<model> - Plan2API Free
- 50 requests a day
- Base URL
- api.plan2api.com/
v1
Updated
Ways to use a ChatGPT plan from code
A ChatGPT subscription gives you no API key on its own. Below are the four ways to get OpenAI models into your own code.
Plus, Go and Free include no API usage and get no API credits. On Pro, the $100, $200 or $500 a month in API credits must be linked to an API organization you own, expire at the end of every billing cycle, can't pay for Codex usage through API keys and don't raise your signed-in Codex limits. Plan2API is the option that runs on the Codex usage your plan already includes.
| Option | What it costs | What you get |
|---|---|---|
| OpenAI API key | Per token, e.g. gpt-6.1-sol $2 in, $10 out per 1M | Any OpenAI API model, pay as you go |
| Pro API credits | Included: $100, $200 or $500 a month | API credits that expire each cycle, not for Codex |
| Sign in with ChatGPT | Your Plus or Pro plan's usage | AI requests inside participating apps only |
| Plan2API on your plan | Free for 50 requests a day, Pro $12 a month | OpenAI-compatible key on your Codex usage |
Connect ChatGPT in 3 steps
- Sign up at plan2api.com/connect with a Google account.
- Connect ChatGPT with a one-time device code: open the link Plan2API shows you, sign in to ChatGPT on OpenAI's own page and enter the code.
- Copy the
p2a_API key you get after connecting (the dashboard Quickstart page has copy-paste setup forcurl, Python and Node).
Device code login only works when it's turned on in your ChatGPT security settings, or in workspace permissions if an admin manages your Business workspace.
Here's the official OpenAI Python SDK pointed at https://api.plan2api.com/v1 and calling openai/gpt-6.1-sol.
from openai import OpenAI
client = OpenAI(
base_url="https://api.plan2api.com/v1",
api_key="p2a_...",
)
reply = client.chat.completions.create(
model="openai/gpt-6.1-sol",
messages=[{"role": "user", "content": "Summarize this diff in one line: ..."}],
)
print(reply.choices[0].message.content)Codex models and what they cost on the API
The table below lists the Codex models on ChatGPT plans, OpenAI's own estimate of local messages per five hours on Plus, and what the same models cost per million tokens on the pay-per-token OpenAI API.
- Plan2API reads the Codex model list live from OpenAI and exposes each model as
openai/<model>(codex/<model>works too), such asopenai/gpt-6.1-soloropenai/gpt-6-astra; requests run on your own ChatGPT plan, so pick a model your plan includes. GET /v1/modelslists every model Plan2API serves, including providers you haven't connected, and a model whose provider isn't connected returns HTTP 403no_credentials.- The five-hour message counts are OpenAI's estimates rather than fixed limits, and OpenAI says API token prices shouldn't be used to estimate included subscription usage.
GPT-5.5 retired from Codex with ChatGPT sign-in on October 14, 2026; OpenAI's replacement is GPT-6.1 Sol on Plus and up, and GPT-6 Luna on Free and Go.
| Model | Plus estimate per 5 hours | API price per 1M (in / out) |
|---|---|---|
gpt-6-astra | 5 to 45 messages | $10 / |
gpt-6.1-sol | 15 to 160 messages | $2 / |
gpt-6.1-terra | 35 to 285 messages | $1 / |
gpt-6-sol | 15 to 150 messages | $2 / |
gpt-6-luna | 350 to 3,000 messages | $0.10 / |
What works and what doesn't
- Requests use the OpenAI Chat Completions format on
POST /v1/chat/completions(see the API docs). - Streaming works.
- Tool and function calling work on Codex models.
- Reasoning effort works via
reasoning_effortor OpenRouter-stylereasoning.effort. - Image input works on Codex models that accept images, and image URLs in messages are passed to OpenAI as sent instead of being fetched by Plan2API.
- JSON mode works with
response_formatset tojson_objectorjson_schema. temperatureandtop_pare ignored on Codex models, and there is no/v1/responsesendpoint, so the Codex CLI itself can't point at Plan2API (it already runs on your plan anyway).- The API sends
Access-Control-Allow-Origin: *CORS headers, so browser apps can call it directly alongside scripts and servers.
Once streaming has started, any error arrives as a final server-sent event instead of an HTTP status code.
Usage limits per ChatGPT plan
Plan2API adds no token quota of its own, so your ChatGPT plan's Codex usage limits apply directly.
You can check what you have left in the Codex usage dashboard or by running /status in the Codex CLI, and Plus and Pro subscribers who hit their limit can buy ChatGPT credits to keep going. OpenAI has given Pro 100 and Pro 500 twice their previous Work and Codex allowance, while Plus usage is unchanged (see ChatGPT Plus vs Pro).
If you connect two or more ChatGPT accounts, a request that hits a limit on one account moves to the next before any output is sent. When every connected account is out of quota, the API returns HTTP 429 with code subscription_quota_exhausted and a Retry-After header set to the earliest reset, or 429 subscription_throttled when OpenAI is rate limiting.
| Plan | Price | Codex access | Five-hour limit |
|---|---|---|---|
| Free | $0 | GPT-6 Luna in the desktop app, subject to rollout | Not published |
| Go | $8 a month | GPT-6 Luna in the desktop app, subject to rollout | Not published |
| Plus | $20 a month | Web, CLI, IDE extension and iOS | Yes, weekly limits may also apply |
| Pro | $100, $200 or $500 a month | Everything in Plus, with more usage | None, weekly limits may apply |
| Business | $20 per user a month, billed yearly | Same five-hour estimates as Plus | Yes, weekly limits may also apply |
Generate images on your ChatGPT plan
On Plan2API Pro and Scale, POST /v1/images/generations and POST /v1/images/edits render images with gpt-image-2 using your connected ChatGPT (Codex) subscription. On Plan2API Free, both endpoints return HTTP 403 with type plan_limit.
You can pass n from 1 to 4, size sets the aspect ratio only (from 1:3 to 3:1, at about 1.57 megapixels per image), output comes back as PNG in b64_json, and edits take up to 5 source images. A render takes about 15 to 45 seconds and up to about 110 seconds at high quality, so set your client timeouts above 2 minutes; OpenAI counts image generations against the same Codex limits as messages, burning through included usage about 3 to 5 times faster than similar turns, and doesn't include them on ChatGPT Free.
Here is a curl request that generates an image through /v1/images/generations.
curl https://api.plan2api.com/v1/images/generations \
-H "Authorization: Bearer $PLAN2API_KEY" \
-H "Content-Type: application/json" \
--max-time 180 \
-d '{
"model": "gpt-image-2",
"prompt": "A ceramic mug on a walnut desk, soft window light",
"n": 1,
"size": "1536x1024"
}' | jq -r '.data[0].b64_json' | base64 --decode > mug.pngPlan2API or Sign in with ChatGPT?
OpenAI's own Sign in with ChatGPT lets eligible Plus and Pro subscribers use their plan for AI requests inside participating apps like Amp Code, Devin, Kilo Code, Notion, Vercel and Warp, as well as open-source tools including OpenCode, OpenClaw, Pi and T3. Usage in those apps counts toward your normal plan limits, and Settings > Usage > App limits lets you cap each app's weekly share.
That only works inside apps that joined OpenAI's program. For your own scripts, internal tools or anything else that speaks Chat Completions, Plan2API gives you a standard base URL (https://api.plan2api.com/v1) and one p2a_ key that can also route to Claude, Gemini and Kimi subscriptions by model prefix.
Connected logins are encrypted with HPKE (X25519) and AES-256-GCM so only your API key can unlock them, the key's secret is never stored, prompts and outputs are never stored, and Plan2API's servers and database run on OVHcloud in Germany (how Plan2API protects logins). Because you sign in on OpenAI's own page, Plan2API never sees your ChatGPT password.
- Free: $0, 1 connected subscription, 2 API keys, 50 chat requests a day, no card required.
- Pro: $12 a month or $99 a year, 3 connected subscriptions, 10 API keys, no daily request cap, image generation included.
- Scale: $29 a month or $249 a year, 25 connected subscriptions, 50 API keys, no daily request cap, image generation included.
Use the AI subscriptions you already pay for as one OpenAI-compatible API key.
- Free: 1 subscription, 50 requests a day, no card
- Pro: $12 a month
FAQ
Does ChatGPT Plus include API access?
No. OpenAI bills the API separately per token, and Plus, Go and Free aren't eligible for the monthly API credits benefit. Pro tiers get $100, $200 or $500 a month in API credits and Business gets pooled per-seat credits, all expiring at the end of each billing cycle.
Can I use ChatGPT Pro's API credits for Codex?
No. OpenAI states that Codex usage through API keys isn't supported by the API credits benefit, and those credits don't raise your ChatGPT or signed-in Codex limits either. Plan2API runs on the signed-in Codex usage your plan already includes.
Can I still use gpt-5.5?
Not with ChatGPT sign-in, because gpt-5.5 retired from Codex on October 14, 2026, though the standard OpenAI API with a paid API key still serves it. On Plan2API, switch to openai/gpt-6.1-sol, OpenAI's replacement on Plus and higher plans.
Is using my ChatGPT plan this way allowed?
OpenAI's official way to use a subscription in third-party software is Sign in with ChatGPT. OpenAI's Pro help article states that sharing account credentials, reselling access and automatically extracting data are prohibited, and that OpenAI may restrict access for misuse. Plan2API runs only your own requests through your own account, and any account risk stays with you.
What happens when I run out of Codex usage?
If you have another ChatGPT account connected to your Plan2API vault, the request switches to that account before any output is sent. Once every connected account is out of quota, the API returns HTTP 429 subscription_quota_exhausted with a Retry-After header set to the earliest reset time in seconds.
How much does Plan2API cost?
Plan2API Free is $0 with no credit card required and gives you 1 connected subscription, 2 API keys and 50 chat requests a day. Pro is $12 a month ($99 a year) and Scale is $29 a month ($249 a year), and you keep paying OpenAI directly for your ChatGPT plan.
Sources
- Codex pricing and usage limitslearn.chatgpt.com
- OpenAI Help Center: About ChatGPT Pro tiershelp.openai.com
- OpenAI API pricingdevelopers.openai.com
- API credits for ChatGPT subscribersdevelopers.openai.com
- Sign in with ChatGPTlearn.chatgpt.com
- Codex models and the GPT-5.5 retirementlearn.chatgpt.com
- Codex authentication and device code loginlearn.chatgpt.com