All models, capabilities, and prices

Authentication

API-AI accepts both OpenAI-style Bearer and Anthropic-style x-api-key. Pass either, never both.

Header forms

The gateway normalizes either header internally. Use whichever your SDK already emits.

http
Authorization: Bearer mdf-...        # OpenAI-style
x-api-key: mdf-...                   # Anthropic-style

Environment variables

Our examples keep the key in API_AI_KEY. SDK clients, though, auto-read their own native names by default — either export the key under that name, or pass API_AI_KEY explicitly to the constructor. The matrix below shows what each tool reads:

Reference data
ClientKey varBase URL var
Anthropic Python / Node SDKANTHROPIC_API_KEYANTHROPIC_BASE_URL
OpenAI Python / Node SDKOPENAI_API_KEYOPENAI_BASE_URL or OPENAI_API_BASE
Claude Code CLIANTHROPIC_API_KEYANTHROPIC_BASE_URL
CursorSettings → Models → API keySettings → Models → Base URL
Roo CodeProvider settings: AnthropicCustom base URL field

Verifying authentication

Hit /v1/models for a cheap, side-effect-free check:

bash
curl -s https://api-ai.app/v1/models \
  -H "x-api-key: $API_AI_KEY" | jq '.data[].id'

A successful response lists the current models. A 401 here means the key is malformed, revoked or not yet active.

Where to keep the key

  • Environment variables — the default for most use cases.
  • ~/.zshrc / ~/.bashrc with HISTCONTROL=ignorespace set, so leading-space commands don’t hit shell history.
  • Secret managers: 1Password CLI, AWS Secrets Manager, Doppler, GCP Secret Manager.
  • Per-project .env files — always .gitignored.
Don't ship the key to the browser
API-AI keys are bearer credentials. Never embed them in a browser bundle or in a public mobile build. Proxy through your own backend instead.

Common pitfalls

  • Trailing slash. https://api-ai.app/v1/ vs https://api-ai.app/v1 — some SDKs concatenate the path naively. Use the no-trailing-slash form above.
  • Double Bearer. Authorization: Bearer Bearer mdf-... happens when a tool already prepends Bearer and you re-add it. Strip the prefix in your config.
  • Anthropic version header. Always include anthropic-version: 2023-06-01 on raw HTTP calls. SDKs add it for you.

Rotating keys

Write to admin@minedom-france.fr from the email address associated with your purchase. Rotation is free and immediate — the old key is revoked the moment the new one is issued. Balance carries across.

Last updated: October 2, 2026Found a bug? admin@minedom-france.fr