Getting Started

Quick start in 3 steps

This guide is for you if you just bought a key and want to use it right away. Three steps: get your key, configure your tool, make a test call.

Step 1: Get your API key

  • With an account: go to Account → API Keys. Click How to use next to a key to open ready-made configs for Claude Code, Cline, Cursor, curl and Python with your key filled in.
  • Bought without signing in: the key is in the "Order completed" email sent to the address you entered at checkout. Check your Spam folder if you cannot find it.

Keys look like sk-.... Treat your key like a password: do not post it online or commit it to Git.

Step 2: Configure your tool

Every tool needs just two things: the Base URL and your API key.

What is the Base URL? It is the server address your AI tool sends requests to. By default Claude Code, Cursor, Cline... send them to Anthropic, OpenAI or Google. If you only paste your ShopAIKey key without changing the Base URL, the tool sends the key to the original server and reports an invalid key. So you always need to change the Base URL to the ShopAIKey address. Depending on the tool, the field may be called Base URL, API Base, Endpoint, Proxy URL or Custom URL.

ToolWhere to change itBase URL
Claude CodeANTHROPIC_BASE_URL in ~/.claude/settings.jsonhttps://api.shopaikey.com
Gemini CLIGOOGLE_GEMINI_BASE_URL in ~/.gemini/.envhttps://api.shopaikey.com
Codex CLIbase_url in ~/.codex/config.tomlhttps://api.shopaikey.com/v1
Cline / Roo Code / Kilo CodeProvider OpenAI Compatible → Base URL fieldhttps://api.shopaikey.com/v1
CursorSettings → Models → Override OpenAI Base URLhttps://api.shopaikey.com/v1
ContinueapiBase in config.yamlhttps://api.shopaikey.com/v1
OpenCodebaseURL in opencode.jsonhttps://api.shopaikey.com/v1
OpenAI SDKbase_url (Python) / baseURL (JS)https://api.shopaikey.com/v1
Anthropic SDKbase_url (Python) / baseURL (JS)https://api.shopaikey.com
Google GenAI SDKhttp_options.base_url (Python) / httpOptions.baseUrl (JS)https://api.shopaikey.com
Other apps (LobeChat, NextChat, Dify, n8n...)Choose the OpenAI provider, fill in API Endpoint / Base URL / Proxy URLhttps://api.shopaikey.com/v1

The most common mistake is the wrong Base URL: OpenAI-style tools need /v1 at the end, Claude Code must not have /v1.

Claude Code

Run one command in your terminal. The script installs Claude Code if needed and asks for your API key: paste it and press Enter.

code
# macOS / Linux
curl -fsSL https://cdn.shopaikey.com/claude/setup.sh | bash
code
# Windows (PowerShell)
irm https://cdn.shopaikey.com/claude/setup.ps1 | iex

Then open your project folder and run claude. For manual setup and more options see the Claude Code guide.

Gemini CLI

Run one command. The script installs Gemini CLI if needed and asks for your API key:

code
# macOS / Linux
curl -fsSL https://cdn.shopaikey.com/gemini-cli/setup.sh | bash
code
# Windows (PowerShell)
irm https://cdn.shopaikey.com/gemini-cli/setup.ps1 | iex

Or write ~/.gemini/.env yourself:

code
GEMINI_API_KEY=sk-YOUR_KEY
GOOGLE_GEMINI_BASE_URL=https://api.shopaikey.com

Then run gemini. Details: Gemini CLI guide.

Cline / Roo Code / Kilo Code (VS Code)

Open the extension settings and fill in:

  • API Provider: OpenAI Compatible
  • Base URL: https://api.shopaikey.com/v1
  • API Key: your key
  • Model ID: a model name, e.g. claude-sonnet-4-5 or gpt-5-mini (see the Model pricing page)

Step by step: Cline guide.

Cursor

Go to Settings → Models:

  1. Enable OpenAI API Key and paste your key.
  2. Enable Override OpenAI Base URL and enter https://api.shopaikey.com/v1.
  3. Add the model name you want (e.g. gpt-5-mini) and click Verify.

Other tools

Codex CLI, OpenCode, Continue and OpenClaw each have their own guide. For code, see OpenAI Format or Anthropic Format.

Step 3: Make a test call

Run the command below (replace sk-YOUR_KEY with your key). If you get a reply, your key works.

code
curl https://api.shopaikey.com/v1/chat/completions \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5-mini","messages":[{"role":"user","content":"Hello"}]}'

If your key only has the Claude package, test with the Anthropic format:

code
curl https://api.shopaikey.com/v1/messages \
  -H "x-api-key: sk-YOUR_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-5","max_tokens":200,"messages":[{"role":"user","content":"Hello"}]}'

On Windows, run curl in Git Bash or WSL. PowerShell handles quotes differently and may report a JSON error.

Which models can my key use?

Each key belongs to one or more groups. For example the Claude group only has Claude models, while the general group has GPT and many others. Calling a model outside your key's groups returns a "No available channel" error.

  • See your key's groups in the Model group column of API Keys, and change them with the Change model group pencil button.
  • See which models each group has on the Model pricing page.

Checking your balance

  • With an account: see the Usage column in API Keys and every request in Usage history.
  • Without an account: enter your key in the Check balance box on the home page.

Having errors?

See Troubleshooting: wrong key, out of balance, model not in your group, temporary overload, Claude Code still asking you to log in...