API Documentation
Point any OpenAI- or Anthropic-compatible client at one endpoint: one gateway to GPT, Claude, Gemini and more.
useAPI speaks the OpenAI and Anthropic wire protocols. Keep the SDKs you already use — only the base URL and the key change.
Quick start
- Create an API key under Dashboard → API keys and copy it right away — the full key is shown a single time.
- Point your SDK's base URL at the endpoint below and pass the key as a Bearer token.
- Send a request. Usage is deducted from your credit as you go.
Base URL
The gateway exposes an OpenAI-compatible and an Anthropic-compatible API under /v1. Both accept the same API key.
https://api.useapi.vip/v1Authenticate every request with your API key:
Authorization: Bearer sk-...Chat completions (OpenAI-compatible)
Drop-in replacement for the OpenAI Chat Completions API. Keep your existing SDK and change only the base URL.
curl https://api.useapi.vip/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RELAY_API_KEY" \
-d '{
"model": "gpt-5.2",
"messages": [
{ "role": "user", "content": "Hello!" }
]
}'Messages (Anthropic-compatible)
Drop-in replacement for the Anthropic Messages API, using the x-api-key header.
curl https://api.useapi.vip/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $RELAY_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-mythos-5-2",
"max_tokens": 256,
"messages": [
{ "role": "user", "content": "Hello!" }
]
}'List models
Enumerate the models your key can call. The response follows the OpenAI /models shape.
curl https://api.useapi.vip/v1/models \
-H "Authorization: Bearer $RELAY_API_KEY"You can also browse the catalog by group in Dashboard → Models.
Billing and limits
Each request is deducted from your quota at the model's USD price on its group; see each deduction on the Usage page. Quota is shown in $ but is not US dollars: ¥1 tops up $1 of quota.
- Platform quota: $1 of quota costs ¥1 to top up and is not the same as $1 USD in a model's official price.
- The Models page lists each model's price here beside the official price (the official USD price at the ¥7 = $1 reference rate); the discount is this site's price ÷ the official price.
- Example: a model priced officially at $5 per million tokens (about ¥35) that uses $9 of quota per million tokens on a balance group costs ¥9 here, about 26% of the official price.
- Plans are billed monthly. Keys on a subscription group spend the plan quota, charged the same way. Each plan's 7-day and 30-day limits are listed on the pricing page; unused quota does not roll over, and once a limit is reached the group's requests pause until the window resets, without charging your account quota.
- Top up from your workbench in whole yuan, from ¥5 up to ¥10,000 at a time, paying with Stripe (card, WeChat Pay or Alipay). Quota never expires.
Follow spend and token totals in Dashboard → Usage.
Errors
401— Missing or invalid API key.402— Not enough account quota. Top up to continue.429— Rate limited — back off and retry.