Appearance
API 端点
所有请求使用标准 HTTP 和 API Key 鉴权。支持的端点和格式:
OpenAI 兼容
| 端点 | 方法 | 说明 |
|---|---|---|
GET /v1/models | GET | 获取可用模型列表 |
GET /v1/models/{model} | GET | 获取模型详情 |
POST /v1/chat/completions | POST | 聊天补全 |
POST /v1/completions | POST | 文本补全 |
Anthropic 兼容
| 端点 | 方法 | 说明 |
|---|---|---|
POST /v1/messages | POST | Claude 格式消息 |
使用示例
bash
curl https://api.tokitoken.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-你的API密钥" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "你好"}],
"stream": true
}'