欢迎使用 Token 中转站 API,一站式访问 GPT-4、Claude、Gemini 等主流 AI 模型。
Base URL: https://api.thistoken.ai/v1
/chat/completions
curl https://api.thistoken.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'
/models
curl https://api.thistoken.ai/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
访问 控制台 注册并获取 API Key。
完全兼容 OpenAI SDK:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.thistoken.ai/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)