# APIVAI > APIVAI (https://apivai.com) is a pay-as-you-go API gateway for Claude and GPT models. One API key works with the Anthropic Messages API format and the OpenAI Chat Completions / Responses formats, so Claude Code, Cursor, Codex CLI, the Anthropic SDK and the OpenAI SDK work by changing only the base URL. Prices are per million tokens, below official list prices. No subscription. ## Key facts - API base URL (Anthropic format, Claude Code, Anthropic SDK): https://api.apivai.com - API base URL (OpenAI format, OpenAI SDK, Cursor, most tools): https://api.apivai.com/v1 - Authentication: `x-api-key: ` or `Authorization: Bearer ` - Endpoints: POST /v1/messages, POST /v1/messages/count_tokens, POST /v1/chat/completions, POST /v1/responses, GET /v1/models - Streaming (server-sent events) is supported on all generation endpoints - Default rate limit: 60 requests per minute per key - Billing: prepaid account balance in USD; each request is charged by input, output and cache tokens - Payment: credit and debit cards, Alipay, WeChat Pay (charged in CNY and converted to USD), cryptocurrency (USDT and more); minimum top-up $10 by card or crypto - Refunds: credits are non-refundable once consumed; unused credits may be refunded at our discretion within 30 days of purchase - Live model list with prices: https://apivai.com/llms-full.txt and https://apivai.com/pricing - Contact: w69787200@gmail.com, Telegram @e3655 ## Quick start Claude Code (macOS / Linux): ``` ANTHROPIC_AUTH_TOKEN="your-key" ANTHROPIC_BASE_URL="https://api.apivai.com" claude ``` OpenAI Python SDK: ``` from openai import OpenAI client = OpenAI(api_key="your-key", base_url="https://api.apivai.com/v1") r = client.chat.completions.create(model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello"}]) ``` ## Pages - [Pricing](https://apivai.com/pricing): per-token prices for every model, with official prices side by side - [API documentation](https://apivai.com/docs): endpoints, parameters and code examples - [OpenAI-compatible API guide](https://apivai.com/openai-compatible-api): using Claude and GPT through the OpenAI format - [Claude API proxy guide](https://apivai.com/claude-api-proxy): Claude Code and Anthropic SDK setup, common errors - [Blog](https://apivai.com/blog): tutorials for Claude Code, Cursor and Codex CLI - [Terms of service](https://apivai.com/terms) - [Privacy policy](https://apivai.com/privacy) ## Languages The site is available in English (https://apivai.com), Russian (https://apivai.com/ru), Chinese (https://apivai.com/zh), Spanish (https://apivai.com/es) and Portuguese (https://apivai.com/pt).