Home / Docs / Quickstart

Quickstart

Get a key, set two environment variables, and make your first request in about a minute.

This page takes you from nothing to a working response. It assumes only curl; SDK versions are in SDKs.

Step 1 — Create a key

  1. Register an account and confirm your email.
  2. Top up credits or buy an unlimited plan. New accounts get a bonus on the first crypto top-up — see 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

export CLAUDEAPIKEY="sk-your-key-here"

Step 3 — Call the API

Anthropic format

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:

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

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:

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.

Troubleshooting the first call

SymptomCauseFix
401Key missing, mistyped, or sent in the wrong headerAnthropic format uses x-api-key; OpenAI format uses Authorization: Bearer
402No credits and no active planTop up or buy a plan
404 on /v1/chat/completionsClient is calling the Anthropic path with an OpenAI body, or vice versaMatch the format to the endpoint — see Overview
model_not_foundModel id not spelled exactly as returned by /v1/modelsCopy the id from the models endpoint