Howwise RSS
AI & Automation8 min read

GPT-4 API Access Not Working: Causes and Fixes

Short answer

GPT-4 API access not working almost always means the key's account, project or tier cannot use that model name, not that your ChatGPT Plus plan failed, because Plus and the API are billed separately. Check the exact error code first.

Key takeaways
  • ChatGPT Plus and the OpenAI API are separate products with separate billing, so a Plus subscription gives no API credits or model access.
  • The error code tells you the cause: model_not_found (404) is access or naming, insufficient_quota (429) is billing, invalid_api_key (401) is the key.
  • Call GET /v1/models with your key to see exactly which models it can use before changing any code.
  • The old snapshot names gpt-4-0314, gpt-4-32k-0314 and gpt-3.5-turbo-0301 are retired, so use a current model such as gpt-4o, gpt-4.1 or gpt-4o-mini.
  • Stale environment variables, a key from the wrong organization or project, and the legacy completions endpoint are common causes that look like access problems.

Why does ChatGPT Plus not give me GPT-4 API access?

ChatGPT Plus is a consumer subscription for the chat website and apps. The API is a developer platform with its own account area, its own keys and pay-as-you-go billing. Paying for one does nothing for the other, and no API credits come with Plus.

In 2023 the GPT-4 API was gated behind a waitlist, which is why older forum answers say to wait for an invite. That waitlist is gone. Today access depends on three things: the API account has a paid balance, its usage tier allows the model, and the key you are using belongs to an organization and project that are permitted to call it.

This also explains the confusing symptom. A gpt-3.5-turbo call may work while a GPT-4-class name fails, because different models can be unlocked at different tiers or blocked by project settings, and some names no longer exist at all.

Which error do you actually have?

Do not guess from the symptom. Read the HTTP status and the error code in the JSON body, because each one points to a different fix.

Status / codeTypical messageMeaningFix
404 model_not_foundThe model `gpt-4` does not exist or you do not have access to itName is retired or wrong, or your org/project/tier cannot use itList models, switch to a listed name, check project allowlist and tier
429 insufficient_quotaYou exceeded your current quota, please check your plan and billing detailsNo credit or a billing limit was reached; the model itself is fineAdd prepaid credit, raise the budget limit, check the right organization
429 rate_limit_exceededRate limit reached for model in organizationToo many requests or tokens per minute for your tierBack off and retry, reduce tokens, or move up a tier
401 invalid_api_keyIncorrect API key providedKey is mistyped, revoked, or from a deleted projectCreate a new key, check the environment variable
404 on the endpointThis is a chat model and not supported in the v1/completions endpointWrong endpoint for a chat modelUse /v1/chat/completions
Tip: insufficient_quota is not an access problem. If you see it, adding credit usually fixes it immediately, whatever model name you use.

How do I check which models my API key can access?

The most reliable test is to ask the API itself. The models endpoint returns only models your key may use, so if your target name is missing from the output, no code change will help.

Start with curl, which removes Python, SDK versions and virtual environments from the picture.

The API can return compact JSON such as "id":"gpt-4o", with no space after the colon. That is why the grep pattern below uses ` *` to allow optional whitespace and matches either layout.

# List models visible to this key
# (pattern allows optional whitespace because the JSON may be compact: "id":"gpt-4o")
curl -s https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" | grep -o '"id": *"gpt-[^"]*"'

# Minimal chat call to a GPT-4 class model
curl -s https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Say ok"}], "max_tokens": 5}'
Tip: If curl works but Python fails, the problem is in your code or environment (SDK version, endpoint, stale variable), not your account.

What is the 2-minute check sequence?

Work through these in order. Each step rules out one cause and costs almost nothing.

  1. Run the curl list-models command above. A 401 means the key is wrong; a list without your model means access or naming; a list containing it means the problem is in your code.
  2. Open the API platform's billing page and confirm there is a positive prepaid balance. A ChatGPT Plus receipt does not count. Add credit if the balance is zero.
  3. Open Settings > Limits for the correct organization and project. Note your usage tier and the models listed as allowed.
  4. Compare your model string with the list from step 1. Remove retired snapshot suffixes and use a current name such as gpt-4o or gpt-4.1.
  5. Confirm the endpoint is /v1/chat/completions and the SDK is current with pip install --upgrade openai.
  6. Print the key prefix and organization your process actually uses, to rule out a stale environment variable.

Usage tiers: why a paid account may still lack a model

API accounts are placed in usage tiers based on how much you have paid and how long ago the first payment was. Higher tiers raise rate limits and unlock more models. Commonly cited thresholds are Free, then Tier 1 after a $5 payment, Tier 2 at $50 spent plus 7 days, Tier 3 at $100 plus 7 days, Tier 4 at $250 plus 14 days, and Tier 5 at $1,000 plus 30 days. Treat these as approximate and confirm the live values on your Limits page, since OpenAI changes them.

A fresh account that has not yet purchased credit sits in the free tier, which typically allows only a small set of models. Buying the minimum prepaid credit is usually what unlocks the GPT-4-class models. Credit and tier changes can take several minutes to appear, so retry after a short wait.

Some newer or more capable models additionally require a verified organization. If the Limits page lists a model but calls still fail, check whether the model's page asks for identity verification.

Warning: Prepaid credit is real money and is generally non-refundable. Buy the smallest amount that unlocks your tier and set a monthly budget limit before running loops or batch jobs.

Fix wrong endpoint, old SDK and retired model names

Three code-level causes produce similar errors. First, chat models only work on /v1/chat/completions. Sending gpt-4o to the legacy /v1/completions endpoint (openai.Completion.create) fails with a message that it is a chat model.

Second, the SDK changed at version 1.0. The pre-1.0 call openai.ChatCompletion.create raises an error in the new library, and the new client syntax does not exist in old installs. Check with pip show openai, then upgrade.

Third, snapshot names such as gpt-4-0314, gpt-4-32k-0314 and gpt-3.5-turbo-0301 have been retired and now return model_not_found for every account. Copying them from an old tutorial is a frequent cause. Use a current name and confirm it on the models page.

Current SDK (1.0 and later):

# pip install --upgrade openai
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY from the environment

resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Say ok"}],
    max_tokens=5,
)
print(resp.choices[0].message.content)

# Is the model visible to this key?
ids = {m.id for m in client.models.list()}
print("gpt-4o" in ids)

# Legacy SDK (<1.0) equivalent, only if you must stay on an old install:
# import openai
# openai.api_key = "sk-..."
# openai.ChatCompletion.create(model="gpt-4o", messages=[...])

Why does the key still fail: organization, project and environment issues

Keys are scoped to a project inside an organization. A project can restrict which models it may call, so a key created in a locked-down project fails with model_not_found even when your account tier is fine. Open that project's settings and check its model allowlist, or create a new key in a project that allows the model.

If you belong to several organizations, the request may be billed to a different one than you expect. Set it explicitly with the OpenAI-Organization and OpenAI-Project headers, or in the SDK with OpenAI(organization="org_...", project="proj_..."). The environment variables OPENAI_ORG_ID and OPENAI_PROJECT_ID do the same.

Environment drift is the sneakiest cause. A stale OPENAI_API_KEY exported in your shell profile, .env file or IDE run configuration silently overrides the key you just pasted into code. Keys from an expired free trial account behave the same way: they authenticate but have no credit and a restricted model set.

To verify, print only the last four characters, for example os.environ["OPENAI_API_KEY"][-4:], and compare it with the key shown in your dashboard. Revoke and replace any key that has been pasted into chat, a repository or a screenshot.

What if my tier does not allow the flagship model?

Pick the strongest model your key can list rather than waiting. For most chatbot, extraction and summarization work, the smaller current models are far cheaper and fast enough, and they usually have higher rate limits at low tiers.

Rate limits are set per model and per tier, in requests per minute and tokens per minute. If you hit 429 rate_limit_exceeded rather than insufficient_quota, add exponential backoff with jitter and cut max_tokens.

SituationReasonable choiceWhy
Flagship model missing from /v1/modelsgpt-4o-mini or gpt-4.1-miniLower cost, broadly available, good for most tasks
Need strong reasoning or long contextgpt-4.1 or gpt-4o once tier allowsHigher capability; verify the name on the models page
Hitting 429 rate limitsSame model with retries and smaller promptsLimits scale with tier and are per model
Still on a retired snapshot nameSwitch to a current aliasRetired names fail for every account

Common questions

Do I need to pay for ChatGPT Plus to use the GPT-4 API?

No. The API is billed separately by usage from prepaid credit, and a Plus subscription neither helps nor is required. You only need an API account with credit and a key that is allowed to call the model.

Why do I get insufficient_quota when I just added a payment method?

Adding a card does not always add usable balance. Under prepaid billing you must buy credit, and the credit must sit in the same organization the key belongs to. Wait a few minutes after purchase and check that no monthly budget limit is set to zero.

Can the same key work for gpt-3.5-turbo but fail for GPT-4 models?

Yes. Model access is checked per model, so a tier, project allowlist or retired name can block one while another works. Compare the output of the models list with the name in your code.

Is gpt-4 itself still available in the API?

Availability of older names changes as models are deprecated, and some are retired. Do not rely on a legacy name; confirm what your key lists, and use a current model such as gpt-4o or gpt-4.1 for new work.

Does the Python openai library version really matter for this error?

It matters for syntax errors, not for model_not_found, which comes from the server. Mixing pre-1.0 and 1.0 syntax raises a Python-side error, so upgrade the package first to remove that variable, then read the server's error code.

Related topics:openai apigpt-4modelnotfoundapi troubleshootingusage tiers