統一存取世界級 AI model。OpenAI-compatible API — 一個 key 支援所有 model。
https://tokenhub.store/api/v1所有 API 請求都使用此 base URL。與 OpenAI SDKs 完全相容。
點選供應商即可查看可用 models 與程式碼範例。
領先的 AI 研究公司,GPT 系列的創造者。以最先進的語言 model 著稱,具備卓越的推理與程式設計能力。
以 Claude models 聞名的 AI 安全公司。擅長細膩對話、程式碼與複雜推理,並具備強大的安全特性。
Google 的 Gemini 系列提供前沿的多模態能力,context window 領先業界,最高可達 2M tokens。
Elon Musk 的 AI 公司。Grok models 以即時知識、機智回應與優秀的程式設計輔助聞名。
Alibaba 的 Qwen 系列提供強大的多語言模型,在英文與中文任務上皆有出色表現。
Zhipu AI 的 GLM 系列。先進的中英雙語模型,支援最高 200K 上下文視窗。
MiniMax 的 M2 系列。超長 205K 上下文,具備強大的多語言能力。
Xiaomi 的 MiMo V2 模型。支援高達 1M tokens 的大型上下文視窗。
Alibaba 的 Qwen3 系列。大型 MoE 模型,具備視覺語言與程式碼專長。
Moonshot AI 的 Kimi K2 系列。具備強大的推理能力與延展上下文視窗。
DeepSeek 的最新模型。高性價比,且具備強大的推理與程式碼能力。
ByteDance 的 Seedance 影片生成模型。支援電影級文字轉影片、圖片轉影片,以及具備音訊支援的多模態影片編輯。
ByteDance 的 Seedream 圖像生成模型。高品質文字轉圖像,支援寫實與藝術風格。
Kwaivgi 的 Kling 影片生成模型。高品質文字轉影片與圖片轉影片,支援 std/pro 模式。時長 3–15s。std: $0.168/s, pro: $0.224/s(不含音訊)。
建立支援串流的 chat completion
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/>輪詢 video 生成任務的狀態
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