Skip to content

Quick Start

This guide takes you from the QuotaAPI console to one verified request. It does not depend on a specific client, so it is the fastest way to confirm your account, balance, model group and API Key.

1. Sign in to the console

Open the QuotaAPI console and sign in. Before creating a client configuration, confirm:

  1. Your account has available balance.
  2. The model group you need is enabled for your account.

If you are not sure which group to use, choose by client: Claude Code uses a Claude group, Codex CLI or OpenAI SDKs use GPT / OpenAI groups, and Gemini CLI uses a Gemini group.

2. Create an API Key

Open API Key management in the console and create a new API Key. Name keys by purpose:

PurposeSuggested name
Local Claude Codelocal-claude-code
Codex CLIlocal-codex-cli
Server-side OpenAI SDKserver-openai-sdk
Gemini CLIlocal-gemini-cli

Store the key securely when it is shown. If you suspect exposure, disable the old key and create a new one.

3. Choose a Base URL

Different protocols use different Base URLs:

Protocol or clientBase URL
OpenAI-compatible API, Codex CLIhttps://quotarouter.ai/v1
Anthropic Messages, Claude Codehttps://quotarouter.ai
Gemini v1beta, Gemini CLIhttps://quotarouter.ai

4. Send a test request

Test the OpenAI-compatible API:

bash
curl https://quotarouter.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_QUOTAAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Say hello from QuotaAPI." }
    ],
    "max_tokens": 64
  }'

Test Claude / Anthropic Messages:

bash
curl https://quotarouter.ai/v1/messages \
  -H "x-api-key: YOUR_QUOTAAPI_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4.8",
    "max_tokens": 64,
    "messages": [
      { "role": "user", "content": "Say hello from QuotaAPI." }
    ]
  }'

Test Gemini v1beta by listing models:

bash
curl "https://quotarouter.ai/v1beta/models?key=YOUR_QUOTAAPI_KEY"

If your OpenAI / GPT group has image generation enabled, you can also test the image endpoint:

bash
curl https://quotarouter.ai/v1/images/generations \
  -H "Authorization: Bearer YOUR_QUOTAAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A small futuristic API gateway console.",
    "size": "1024x1024",
    "response_format": "b64_json"
  }'

5. Check usage records

After a successful request, return to the console and review request records and balance changes. A complete request usually shows:

  1. Request time and model name.
  2. Token usage or billable amount.
  3. Charge amount or pricing multiplier result.
  4. Success state, or the returned error message.

Common checks

  • 401: API Key is missing, disabled, copied with extra spaces, or not passed in the expected auth field.
  • 403: the key does not have permission for the target group or model.
  • 402 or insufficient-balance message: recharge before retrying.
  • 429: request rate or concurrency limit was reached.
  • 400: request body, model name or parameters are invalid for the target protocol.

WARNING

Never place real API Keys in public repositories, ticket screenshots, chat logs or frontend code. For server-side usage, inject the key through environment variables.

QuotaAPI is an AI API relay service for developers and teams.