Skip to main content
403Not retryable

OpenAI 403 Permission Denied

Authenticated but not allowed: the key's project lacks model access, or your region/organization is restricted.

Most likely causes

  1. 1.Model not enabled for the project (limited-access models)
  2. 2.Country/region not supported
  3. 3.Project-level model allowlist excludes the requested model

Fix checklist

  • Check project settings → limits → model access in the dashboard
  • Use a model your project is provisioned for; list via /v1/models
  • Contact your org admin about allowlist policy

Retry guidance

Not retryable.

// 403 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 === 403) {
  const body = await res.json();
  // Do not retry: log the provider's message — it names the exact problem.
  throw new Error(`OpenAI 403: ${JSON.stringify(body.error ?? body)}`);
}

Provider status page: status.openai.com