01
Create one key
Sign in, create a scoped API key, and choose the service group for your project.
Cổng API mô hình AI thống nhất. Giá tốt hơn, độ ổn định cao hơn. Chỉ cần thay đổi base URL để bắt đầu.
Tương thích với định dạng OpenAI, Anthropic, Gemini
from openai import OpenAI client = OpenAI( api_key="sk-xxx", base_url="https://tokencode.dev/v1", ) # Switch to any model by name resp = client.chat.completions.create( model="gpt-5.5", messages=[{"role": "user", "content": "Hello!"}], stream=True, ) for chunk in resp: print(chunk.choices[0].delta.content, end="")
import OpenAI from 'openai' const client = new OpenAI({ apiKey: 'sk-xxx', baseURL: 'https://tokencode.dev/v1', }) // Switch to any model by name const stream = await client.chat.completions.create({ model: 'gpt-5.5', messages: [{ role: 'user', content: 'Hello!' }], stream: true, }) for await (const chunk of stream) { process.stdout.write( chunk.choices[0]?.delta?.content ?? '' ) }
curl https://tokencode.dev/v1/chat/completions \ -H "Authorization: Bearer sk-xxx" \ -H "Content-Type: application/json" \ -d { "model": "gpt-5.5", "stream": true, "messages": [ {"role": "user", "content": "Hello!"} ] }
Sign in, create a scoped API key, and choose the service group for your project.
Keep your OpenAI-compatible client and point it at the gateway endpoint.
Track token usage, latency, provider status, and cost from the portal.
Đăng ký, lấy khóa và thực hiện lệnh gọi API đầu tiên.