# Quickstart > Get a key, set two environment variables, and make your first request in about a minute. _Source: https://aiprimetech.io/docs/getting-started/quickstart/ · Home > Docs > Getting started_ This page takes you from nothing to a working response. It assumes only `curl`; SDK versions are in [SDKs](/docs/sdks/). ## Step 1 — Create a key 1. [Register an account](/register) and confirm your email. 2. [Top up credits](/topup/) or [buy an unlimited plan](/plans/). New accounts get a bonus on the first crypto top-up — see [Pricing](/docs/billing/pricing/). 3. Open the dashboard, go to **API Keys**, and create a key. It begins with `sk-`. 4. Copy it immediately — the full value is shown once. ## Step 2 — Export it ```bash export CLAUDEAPIKEY="sk-your-key-here" ``` ## Step 3 — Call the API ### Anthropic format ```bash curl https://aiprimetech.io/v1/messages \ -H "x-api-key: $CLAUDEAPIKEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}] }' ``` ### OpenAI format Identical models, different envelope — pick whichever matches your client: ```bash curl https://aiprimetech.io/v1/chat/completions \ -H "Authorization: Bearer $CLAUDEAPIKEY" \ -H "content-type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello"}] }' ``` ## Step 4 — Confirm what you can reach ```bash curl https://aiprimetech.io/v1/models \ -H "Authorization: Bearer $CLAUDEAPIKEY" ``` That returns every model id your key can address. Use those ids verbatim in the `model` field. ## Step 5 — Point a real tool at it For Claude Code, two variables are the whole setup: ```bash export ANTHROPIC_BASE_URL="https://aiprimetech.io" export ANTHROPIC_AUTH_TOKEN="$CLAUDEAPIKEY" claude ``` > If `ANTHROPIC_API_KEY` is already set in your shell, Claude Code may bill that key instead and silently ignore your subscription. Unset it when switching. See [Claude Code](/docs/guides/claude-code/). ## Troubleshooting the first call | Symptom | Cause | Fix | |---|---|---| | `401` | Key missing, mistyped, or sent in the wrong header | Anthropic format uses `x-api-key`; OpenAI format uses `Authorization: Bearer` | | `402` | No credits and no active plan | [Top up](/topup/) or [buy a plan](/plans/) | | `404` on `/v1/chat/completions` | Client is calling the Anthropic path with an OpenAI body, or vice versa | Match the format to the endpoint — see [Overview](/docs/api-reference/overview/) | | `model_not_found` | Model id not spelled exactly as returned by `/v1/models` | Copy the id from the models endpoint | - [Authentication](https://aiprimetech.io/docs/getting-started/authentication/) — Header and env-var reference - [Messages API](https://aiprimetech.io/docs/api-reference/messages/) — Full request and response schema - [Errors](https://aiprimetech.io/docs/api-reference/errors/) — Every status code and what it means --- _ClaudeAPIKey.dev is an independently operated, Anthropic-compatible API gateway. Not affiliated with Anthropic._