Fix OpenAI 404 Model Not Found
Fix OpenAI 404 Model Not Found Error
The 404 Not Found error with the message "The model does not exist or you do not have access to it" is a common issue when working with the OpenAI API. This error means either the model name is incorrect, the model has been deprecated, or your account does not have access to it. Here is how to diagnose and fix every variant of this error.
Understanding the Error
{
"error": {
"message": "The model `gpt-4o-latest` does not exist or you do not have access to it.",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
Cause 1: Typo in Model Name
Model names must be exact. Here are common mistakes:
gpt-4-oshould begpt-4o(no hyphen before "o")gpt4oshould begpt-4o(missing hyphen)GPT-4oshould begpt-4o(lowercase only)gpt-4o-latestmay not be a valid snapshot — usegpt-4ogpt-35-turboshould begpt-3.5-turbo(dot, not hyphen)dall-e-3is correct for image generation, but cannot be used with chat completions
Valid Model Names (2026)
Here is a reference list of currently available models:
# GPT-4o family
gpt-4o
gpt-4o-mini
# GPT-4 family
gpt-4-turbo
gpt-4
# GPT-3.5 family
gpt-3.5-turbo
# Reasoning models
o1
o1-mini
o3-mini
# Embedding models
text-embedding-3-large
text-embedding-3-small
text-embedding-ada-002
# Image generation
dall-e-3
dall-e-2
# Text-to-speech
tts-1
tts-1-hd
# Speech-to-text
whisper-1
Cause 2: Deprecated or Retired Model
OpenAI periodically retires older model versions. If you are using a dated snapshot, it may no longer be available:
gpt-4-0314— Retired, usegpt-4gpt-4-0613— Retired, usegpt-4orgpt-4-turbogpt-3.5-turbo-0301— Retired, usegpt-3.5-turbotext-davinci-003— Retired, usegpt-3.5-turbocode-davinci-002— Retired, usegpt-4o
gpt-4o) unless you specifically need a pinned version.
Cause 3: Account Access Restrictions
Some models require specific account tiers or approval:
- Free tier accounts may not have access to all models
- GPT-4 requires at least a Tier 1 account (paid)
- o1 and reasoning models may require higher usage tiers
- Fine-tuned models are only accessible to the organization that created them
Cause 4: Wrong API Endpoint
Using the wrong endpoint for a model type will return 404:
# Wrong - DALL-E with chat completions endpoint
POST /v1/chat/completions
{"model": "dall-e-3", ...} # 404!
# Correct - DALL-E with images endpoint
POST /v1/images/generations
{"model": "dall-e-3", "prompt": "A sunset over mountains"}
# Wrong - Embedding model with chat endpoint
POST /v1/chat/completions
{"model": "text-embedding-3-small", ...} # 404!
# Correct - Embedding with embeddings endpoint
POST /v1/embeddings
{"model": "text-embedding-3-small", "input": "Hello world"}
How to List Available Models
from openai import OpenAI
client = OpenAI(base_url="https://claude4u.com/v1")
# List all models your account can access
models = client.models.list()
for model in sorted(models.data, key=lambda m: m.id):
print(model.id)
// Node.js
import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://claude4u.com/v1' });
const models = await client.models.list();
models.data
.sort((a, b) => a.id.localeCompare(b.id))
.forEach((m) => console.log(m.id));
# cURL
curl https://claude4u.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
Cause 5: Organization or Project Mismatch
If you belong to multiple organizations, a model available in one org may not be in another:
from openai import OpenAI
client = OpenAI(
api_key="sk-your-key",
organization="org-correct-org-id",
base_url="https://claude4u.com/v1"
)
Quick Debugging Steps
- Double-check the exact model name for typos and case
- List available models with the
/v1/modelsendpoint - Check if the model has been deprecated on OpenAI's documentation
- Verify your account tier has access to the requested model
- Ensure you are using the correct API endpoint for the model type
- Try using the base model name without a date snapshot suffix
Get Started with 轻舟 AI
Stable, fast AI API relay — supports Claude, OpenAI, Gemini and more
Sign Up Free
轻舟 AI