Skip to main content

'Invalid Anthropic key' error when saving

What each error on the API Key page means when Olvio can't save your Anthropic key or model, and how to fix it.

'Invalid Anthropic key' error when saving

When you click Save in the save bar on the API Key page, Olvio first cleans up the key you pasted and checks that it looks like an Anthropic key. It then sends Anthropic a very small test request with the model selected in Claude model. If any of these checks fails, nothing is saved and Olvio shows an error message. The message appears briefly at the bottom of the page. If it disappears before you can read it, click Save in the save bar again. This article explains the messages you can see and how to fix them. To connect a key for the first time, see Connect your Anthropic (Claude) API key.

These error messages are always shown in English, whatever language your Olvio admin uses.

Invalid Anthropic key. Please check it and try again.

Anthropic refused the key itself. The key may be mistyped, cut off, disabled, deleted or expired, or it may not have permission to use the Claude API in its workspace. A key also stops working when the person or service account it's linked to no longer has access to your Anthropic organization or workspace.

  1. In the Claude Console, open Settings → API keys. The Claude Console is at platform.claude.com (console.anthropic.com, named in Olvio's messages, redirects there).

  2. Find the key and check that it's active and hasn't expired. You can turn a disabled key back on with Re-enable. An expired key can't be reactivated.

  3. If the key has expired or been deleted, or you're not sure it's the right one, click Create key. Choose an expiration that fits how long you want Olvio to keep working: it can't be changed later, and once the key expires the chat stops answering until you save a new key. Limit the key to a single workspace, then copy the new key.

  4. In Olvio, paste the key into the API key field and click Save in the save bar.

If Anthropic also refuses a newly created key, check your organization's access and workspace settings in the Claude Console. If several people manage your Anthropic account, set Linked account to a service account when you create the key, so the key doesn't stop working when one person leaves. An organization admin creates service accounts in the Claude Console.

The key doesn't look like an Anthropic API key

Olvio shows this message before contacting Anthropic, when what you pasted isn't shaped like an Anthropic key. An Anthropic key starts with sk-ant- and contains only letters, digits, hyphens and underscores.

Olvio already removes spaces (including zero-width and non-breaking spaces), line breaks and curly quotes from what you paste, and turns long dashes into hyphens. If you still see this message, the most likely causes are:

  • The key comes from another service, not from Anthropic.

  • Part of the key is missing, or extra text was copied with it, such as straight quotation marks or a name or label in front of the key.

  • The key was copied through Word, Notion or a formatted email, which can replace characters with look-alikes.

Paste the key again from where you saved it when you created it, without copying it through a formatted document. The Claude Console shows a key only once, so if you no longer have it, create a new key in Settings → API keys.

If you see Please enter an API key. instead, nothing usable was pasted, for example only spaces, and no key is saved yet. Copy the key again and paste it into the API key field.

Anthropic rejected this model for your account

Anthropic refused the test request, and the model isn't always the cause. When Anthropic gives a reason, the message includes it right after the colon, and that reason tells you what to fix. The closing suggestion to try a different Claude model is added by Olvio and only helps when the reason is about the model:

  • The reason says the selected model isn't available to your organization. Choose Claude Haiku 4.5 — fastest, lowest cost (recommended) in Claude model and click Save in the save bar. If the save bar closes instead, Claude Haiku 4.5 is already your saved model and nothing needs saving.

  • Your usage reached a spend limit you set for your Anthropic organization or workspace. The reason then begins with You have reached your specified. Changing the model won't help. For an organization limit, open Settings → Billing in the Claude Console, click Adjust limit in the Spend limits section and raise the limit. If the reason mentions your workspace, open Settings → Workspaces, select the workspace and raise the limit on its Spend limits tab. Then save again.

  • The reason mentions your credit balance. Changing the model won't help: add credits as described in Your Anthropic account has no credits left below, then save again.

  • The reason says anthropic-workspace-id is required. Your key isn't limited to a single workspace (this applies even if your organization has only one workspace), and Olvio's requests don't name a workspace. Create a key limited to a single workspace, then paste it into Olvio.

If the message gives no reason (Anthropic rejected this model for your account. Your tier may not allow this model…), choose Claude Haiku 4.5 — fastest, lowest cost (recommended) in Claude model and click Save in the save bar once. If the save bar closes instead, Claude Haiku 4.5 is already your saved model, but the cause may still affect your saved key: check your spend limits and credit balance in the Claude Console, or paste your key into the API key field and click Save to test it with Haiku. If the save still fails, check your spend limits and credit balance in the Claude Console, then contact us. See Contact us and support hours.

Anthropic returned an HTTP error code

The message reads, for example, Anthropic returned HTTP 402. Please retry; if it persists, contact Olvio support with this code. Anthropic answered with an error that has no dedicated message in Olvio, and the code tells you what kind of problem it is. 402 means Anthropic found a problem with your billing or payment information: check your payment details in the Claude Console, then save again.

If the message keeps appearing, contact us and include the code. See Contact us and support hours.

Your Anthropic account has no credits left

Unless your organization is invoiced monthly by Anthropic, Claude API usage is paid with prepaid credits. Once your credit balance runs out, Anthropic refuses every request, whatever the model, until you add more. Olvio's test request is refused too, so the save fails with one of the messages in this article. If a save keeps failing, check your balance:

  1. Sign in to the Claude Console with an Admin or Billing role and open Settings → Billing.

  2. Click Buy credits and enter the amount you want. To keep your balance from running out again, click Edit in the Auto-reload section and turn it on.

  3. In Olvio, click Save in the save bar again.

Temporary errors

These messages don't mean your key is wrong:

  • Anthropic rate-limited the validation request. The key may be valid. Wait a minute and save again. If it keeps failing, your Anthropic organization may have reached the monthly spend cap of its usage tier. Anthropic then refuses requests until the first day of next month, unless your limit is raised sooner. To ask Anthropic for a higher cap, use Request rate limit increase on the Rate limits page of the Claude Console.

  • Anthropic is currently unavailable. Try again in a moment. The problem is on Anthropic's side, so you don't need to change your key. Save again in a moment.

  • Could not save your key. Try again in a moment. Something unexpected went wrong, for example Anthropic took too long to answer. Save again.

  • Too many requests. Try again in a moment. Olvio limits how many requests your store can make in a short time, including requests from shoppers on your storefront. Wait a moment, then save again.

When you change only the model

If a key is already saved and you pick another model without pasting a key, Olvio tests your saved key with the new model before saving. The Anthropic messages above can appear in this case too. One more message can appear only here:

  • Could not read your saved key. Re-enter it to switch models. Paste your key into the API key field, or create a new key in the Claude Console if you no longer have it. Keep the model you want, and click Save in the save bar.

To choose a model and see what it's used for, see Choose your Claude model.

What happens to your saved key when a save fails

Olvio never stores a key that failed the check. If a key was already saved, it stays in use, the Status badge still shows Connected, and your saved model doesn't change. The page keeps what you typed so you can fix it, and the Claude model menu keeps showing the model you picked even though it wasn't saved. To clear what you typed and go back to your saved model, click Discard in the save bar. When a save succeeds, you see Settings saved.

If your key stops working after it was saved

Olvio checks your key only when you save it. The Connected badge means a key is saved, not that Anthropic still accepts it. Shoppers see Sorry, an error occurred. Please try again. in the chat, or its translation on a storefront in another language, when for example:

  • The key is disabled, deleted or has expired.

  • The person or service account the key is linked to no longer has access to your Anthropic organization or workspace.

  • Your credit balance runs out.

  • Anthropic refuses requests for other billing reasons, because a spend limit is reached, or because your organization reached its usage tier's monthly spend cap.

To fix it, solve the problem in the Claude Console, or create a new key, paste it on the API Key page and click Save in the save bar. The chat replies 'Sorry, an error occurred. Please try again.' lists other causes of this chat message.

Did this answer your question?