Skip to main content
provider_unauthorized means the model service refused OpenType’s own credentials when it tried to run your request. Read this page if you see this code and are wondering whether your API key is at fault: it is not.

What happened

Route: POST /v1/runs. The model service that runs Neon 1.1 rejected the credentials OpenType uses to call it. This is a service-side configuration problem. Your own key was accepted: a problem with it answers 401 invalid_credential before any run starts. Every provider_* code has the same message, “the provider call failed”. Branch on code, never on the message. The message never contains model output. If this was the first model call, the run was refused before the model served it. You are not charged, and the hold is released, but the run stays pending: a replay with the same Idempotency-Key returns 202 with "state": "pending". If an earlier call in the same run was served (a verdict repair), the run is settled failed and a replay returns 200 with "state": "failed". In both cases, retry with a new key.

How to fix

  • Do not rotate or replace your API key; it is not the cause.
  • Retry after a few minutes with a new Idempotency-Key. A fast retry loop gets the same answer.
  • If it persists, report the request_id.

Example

A retry loop with backoff and a new key per attempt:
  • Error handling - a status-to-action table and a retry helper for every error.
  • Idempotency - when to reuse an Idempotency-Key and when to send a new one.
  • Request ids - send your own x-request-id and quote it when you report a problem.
  • Problem codes - every code, its status, and whether a retry can help.