统一访问世界级 AI model。OpenAI-compatible API — 一个 key 适用于所有 model。
https://tokenhub.store/api/v1所有 API 请求都使用此基础 URL。与 OpenAI SDKs 完全兼容。
点击某个提供商以查看可用 model 和代码示例。
领先的 AI 研究公司,GPT 系列的创造者。以最先进的语言 model 闻名,具备卓越的推理和编程能力。
以 Claude models 闻名的 AI 安全公司。在细腻对话、代码和复杂推理方面表现出色,并具备强大的安全特性。
Google 的 Gemini 系列提供前沿的多模态能力,支持业界领先的上下文窗口,最高可达 2M tokens。
Elon Musk 的 AI 公司。Grok models 以实时知识、机智回应和出色的编程辅助而闻名。
Alibaba 的 Qwen 系列提供强大的多语言模型,在英文和中文任务上都表现出色。
Zhipu AI 的 GLM 系列。先进的中英双语模型,支持最高 200K 上下文窗口。
MiniMax 的 M2 系列。超长 205K 上下文,具备强大的多语言能力。
小米的 MiMo V2 模型。上下文窗口可达 1M Tokens。
Alibaba 的 Qwen3 系列。规模巨大的 MoE 模型,专注于视觉语言与编程能力。
Moonshot AI 的 Kimi K2 系列。具备强推理能力,并支持扩展上下文窗口。
DeepSeek 的最新模型。性价比极高,并具备强大的推理和编程能力。
ByteDance 的 Seedance 视频生成模型。支持电影级 text-to-video、image-to-video 以及带音频支持的多模态视频编辑。
ByteDance 的 Seedream 图像生成模型。高质量 text-to-image,支持写实和艺术风格。
Kwaivgi 的 Kling 视频生成模型。支持高质量 text-to-video 和 image-to-video,提供 std/pro 模式。时长 3–15 秒。std:$0.168/s,pro:$0.224/s(无音频)。
创建支持流式传输的聊天补全
Authorization: Bearer th-your-api-key Content-Type: application/json
{
"model": "openai/gpt-4.1",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7,
"max_tokens": 1000,
"stream": false
}根据文本或图像提示生成视频(Seedance & Wan 2.2 models)
Authorization: Bearer th-your-api-key Content-Type: application/json
{
"model": "bytedance/doubao-seedance-2.0",
"prompt": "A golden retriever running on a sunny beach",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}{
"model": "bytedance/doubao-seedance-2.0",
"prompt": "Hand picks a fresh apple from the tree, the scene smoothly transitions to a hand holding an apple smoothie drink, cinematic lighting in an orchard",
"content": [
{
"type": "image_url",
"image_url": { "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg" },
"role": "first_frame"
},
{
"type": "image_url",
"image_url": { "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg" },
"role": "last_frame"
}
],
"duration": 5,
"resolution": "720p"
}content(可选):媒体资源数组。每一项包含:
type:"image_url"image_url.url:图片的 URLrole:<firstFrame/>(最多 1 个)、<lastFrame/>(最多 1 个)、<refImage/>、<refVideo/>、<refAudio/>轮询视频生成任务的状态
Authorization: Bearer th-your-api-key
{
"id": "tsk-xxx",
"object": "video.generation.task",
"model": "bytedance/doubao-seedance-2.0",
"status": "succeeded", // "queued" | "running" | "succeeded" | "failed"
"data": [
{
"video_url": "https://..."
}
]
}根据文本提示生成图像(Seedream models)
Authorization: Bearer th-your-api-key Content-Type: application/json
{
"model": "bytedance/doubao-seedream-5.0",
"prompt": "A serene mountain landscape at sunset",
"n": 1,
"size": "2048x2048"
}列出所有可用的 model
curl https://tokenhub.store/api/v1/chat/completions \
-H "Authorization: Bearer th-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4.1",
"messages": [{"role": "user", "content": "Hello!"}]
}'from openai import OpenAI
client = OpenAI(
api_key="th-your-api-key",
base_url="https://tokenhub.store/api/v1"
)
# Use any supported model
response = client.chat.completions.create(
model="openai/gpt-5.4", # Or any other model
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'th-your-api-key',
baseURL: 'https://tokenhub.store/api/v1',
});
// Use any supported model
const response = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-4-6',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);from openai import OpenAI
client = OpenAI(
api_key="th-your-api-key",
base_url="https://tokenhub.store/api/v1"
)
stream = client.chat.completions.create(
model="google/gemini-2.5-pro",
messages=[{"role": "user", "content": "Write a short story."}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")联系我们: support@tokenhub.store