The error looks blunt: 401 Unauthorized. Most people read it as "I'm locked out" and start panicking, reinstalling, or blaming the model. In practice a 401 is the simplest error of the lot: the service looked at your key and said "I don't know you". The model never even saw your message.

The four usual causes

1. The key is copied wrong. A missing character, a trailing space, or an old key left in the settings while the new one sits in your notes. This is the most common cause by far.

2. The key expired or was revoked. Some services rotate keys, some let you delete them — and a deleted key fails exactly like a fake one.

3. The balance is empty. Plenty of services answer an empty wallet with a 401 instead of a clear "top up" message. Annoying, but common.

4. The address and the key don't belong together. A key from service A pasted into the settings for service B will always get a 401. When you switch providers, the base URL, the key and the model name have to change together — all three.

A 60-second checklist

Run it in this order before you change anything else:

  1. Address — is the base URL the one this key was issued for?
  2. Key — paste it fresh from where it was issued; check for spaces at both ends.
  3. Model name — does it match what this service calls the model?
  4. Balance — log in and look. If the balance page shows zero, that was your answer.

How 401 differs from its neighbours

  • 401 = the guard doesn't recognize your card. Key, address, or balance.
  • 403 = the guard recognizes you, but you're not allowed in this room — permissions or region rules.
  • 429 = you're allowed in, but the queue is full. Wait and retry slowly.

Learning to tell these three apart saves hours. Most "the API is down" evenings are actually a key that died quietly three days earlier.

On the relay I run, a dead key or an empty balance is visible line by line in the billing log, which is how it should be — when something fails, you deserve an error you can actually diagnose.

Next time a 401 pops up, don't reinstall anything. Check the card first.