Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Aider error

Aider: The API provider is not able to authenticate you. Check your API key

Error message
The API provider is not able to authenticate you. Check your API key.

Status: By designLast verified 2 documented fixes2 sources

What it means

The provider returned a litellm AuthenticationError. Aider prints this description, treats the error as non-retryable, and stops the request.

Causes

  • Missing, wrong or expired API key for the selected provider (aider's exception description: "Check your API key.").

How to fix it

  1. Fix 1.

    Provide the correct key with --api-key, or through environment variables or config files as described in the API keys docs.

    Terminal
    aider --model deepseek --api-key deepseek=your-key-goes-here
  2. Fix 2.

    If you have no keys, aider offers to connect you to OpenRouter (Models and API keys doc).

More Aider errors

All 17 Aider errors

FAQ

What does "The API provider is not able to authenticate you. Check your API key" mean in Aider?

The provider returned a litellm AuthenticationError. Aider prints this description, treats the error as non-retryable, and stops the request.

How do I fix "The API provider is not able to authenticate you. Check your API key"?

There are 2 documented fixes. Start with the first: Provide the correct key with --api-key, or through environment variables or config files as described in the API keys docs.

Is this Aider error fixed?

Status: By design. Expected behavior, not a bug. The documented fixes change the setup that triggers it. Affected versions: All versions that use litellm exception mapping.

Sources

Last verified against 2 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.