API Reference
Compatible with the OpenAI SDK. Switch by changing base_url and api_key. For step-by-step tutorials, see the User Guide.
All API requests require a valid API key sent via the Authorization header.
| Header | Value | Description |
|---|---|---|
Authorization |
Bearer sk-... | Your API key with the sk- prefix |
API keys are managed in your dashboard. You can create and revoke keys at any time.
The primary endpoint for generating model responses. Fully compatible with the OpenAI Chat Completion API.
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Model identifier (e.g. deepseek-chat, glm-4-plus) |
messages |
array | Yes | Array of message objects with role and content |
temperature |
number | No | Sampling temperature (0-2, default: 1.0) |
max_tokens |
number | No | Maximum tokens to generate (default: model maximum) |
stream |
boolean | No | Enable streaming via SSE (default: false) |
routing |
string | No | Routing strategy: auto, cheapest, fallback |
provider_key |
object | No | BYOK mode: {provider, api_key}. When present, switches to BYOK billing |
curl https://api.find-token.com/v1/chat/completions \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Explain quantum computing in simple terms."} ], "temperature": 0.7, "max_tokens": 500, "stream": false }'
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1715212345,
"model": "deepseek-chat",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum computing uses quantum bits..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 142,
"total_tokens": 167
}
}
| Header | Description |
|---|---|
X-FindToken-Mode |
Billing mode used: standard or byok |
X-FindToken-Cost |
Cost in USD for this request (e.g. 0.00123) |
X-FindToken-Balance |
Remaining credits balance (standard mode only) |
Set stream: true to receive responses as Server-Sent Events. Compatible with OpenAI SSE format.
curl https://api.find-token.com/v1/chat/completions \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat", "messages": [{"role": "user", "content": "Count to 5."}], "stream": true }'
Each event follows the SSE format with data: prefixes. The stream ends with data: [DONE].
Bring your own provider API key for each request. The key is validated but never stored on our servers.
curl https://api.find-token.com/v1/chat/completions \ -H "Authorization: Bearer sk-your-findtoken-key" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat", "messages": [{"role": "user", "content": "Hello!"}], "provider_key": { "provider": "deepseek", "api_key": "sk-your-deepseek-key-here" } }'
You can pre-register your provider keys via the dashboard or the POST /v1/user/byok/register endpoint. Registration is optional but recommended for key validation.
Returns your current credits balance and BYOK usage for the current month.
{
"credits": 9.45,
"credits_cents": 945,
"byok_usage_month": 50000,
"byok_limit_month": 1000000,
"reset_date": "2026-06-01T00:00:00Z"
}
Create a Stripe checkout session to recharge credits.
{
"amount": 20.00,
"success_url": "https://app.find-token.com/dashboard",
"cancel_url": "https://app.find-token.com/pricing"
}
Register a BYOK provider key. The key is validated but never persisted to our database.
{
"provider": "deepseek",
"api_key": "sk-...",
"name": "My DeepSeek Account"
}
| Status | Code | Description |
|---|---|---|
400 |
Bad Request | Invalid request body or parameters |
401 |
Unauthorized | Invalid or missing API key |
402 |
Insufficient Credits | Balance too low for the request (standard mode) |
429 |
Rate Limited | Exceeded 100 requests/second per key |
500 |
Gateway Error | Internal server error |
502 |
Provider Error | Upstream provider returned an error |
503 |
All Providers Unavailable | No healthy provider available for the requested model |
504 |
Provider Timeout | Upstream provider timed out after retries |
{
"error": {
"message": "Insufficient credits. Balance: $0.15, Required: $0.23",
"type": "insufficient_balance",
"code": "insufficient_credits",
"param": null
}
}
| Model ID | Provider | Input ($/1M tokens) | Output ($/1M tokens) |
|---|---|---|---|
| Loading... | |||
Prices in USD per 1M tokens. Data loaded from API in real-time.
find-token offers an Anthropic-compatible endpoint that allows you to use Claude Code, Claude Desktop, and other Anthropic-protocol tools with Chinese AI models.
Set the following environment variables to use find-token with Claude Code:
export ANTHROPIC_BASE_URL=https://api.find-token.com/anthropic
export ANTHROPIC_AUTH_TOKEN=sk-ft_your_api_key
export ANTHROPIC_MODEL=deepseek-v4-flash
| Model ID | Provider | Best For |
|---|---|---|
deepseek-v4-flash | DeepSeek | General purpose (recommended default) |
deepseek-v4-pro | DeepSeek | Complex reasoning, coding |
glm-4-plus | Zhipu AI | Chinese language tasks |
qwen-max | Alibaba Cloud | General purpose |
kimi-k2 | Moonshot AI | Coding & reasoning |
Retrieve the list of available models:
curl https://api.find-token.com/anthropic/v1/models -H "x-api-key: sk-ft_your_key"
Rate limits are applied per API key on a rolling 60-second window.
| Limit | Window | Scope |
|---|---|---|
| 100 requests | 1 second | Per API key |
When exceeded, the API returns a 429 status code. Implement exponential backoff in your client to handle rate limits gracefully.