Skip to main content
404Not retryable

OpenAI 404 Not Found

The model or endpoint doesn't exist for this key — typo'd model ID, retired model, or wrong API surface.

Most likely causes

  1. 1.Model ID typo or a model retired since the code was written
  2. 2.Calling /v1/chat/completions for a Responses-API-only model (or vice versa)
  3. 3.Fine-tuned model ID from a different project

Fix checklist

  • List available models with GET /v1/models and copy IDs exactly
  • Check the deprecations page for retirement dates
  • Confirm the fine-tune belongs to the calling project

Retry guidance

Not retryable.

// 404 is NOT retryable — surface it and fix the request/config.
const res = await fetch("https://api.openai.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
  },
  body: JSON.stringify(payload),
});
if (res.status === 404) {
  const body = await res.json();
  // Do not retry: log the provider's message — it names the exact problem.
  throw new Error(`OpenAI 404: ${JSON.stringify(body.error ?? body)}`);
}

Provider status page: status.openai.com