API 문서

세계 최고 수준의 AI model에 대한 통합 액세스. OpenAI-compatible API — 모든 model을 위한 하나의 key.

API Base URL

https://tokenhub.store/api/v1

모든 API 요청은 이 base URL을 사용합니다. OpenAI SDKs와 완벽하게 호환됩니다.

빠른 시작

몇 분 만에 시작하기

  1. 계정 만들기 후 Dashboard에 로그인하세요
  2. 이동하여 API Keys 에서 새 API key를 생성하세요
  3. 방문하여 Billing 에서 계정에 Credits를 추가하세요
  4. 지원되는 모든 model로 API 호출을 시작하세요

지원되는 Models

provider를 클릭하면 사용 가능한 model과 코드 예제를 볼 수 있습니다.

OpenAI

6 models

GPT 시리즈를 만든 선도적인 AI 연구 회사입니다. 뛰어난 추론과 코딩 역량을 갖춘 최첨단 language model로 잘 알려져 있습니다.

Anthropic

6 models

Claude model로 잘 알려진 AI safety 회사입니다. 강력한 안전 기능과 함께 미묘한 대화, code, 복잡한 추론에 뛰어납니다.

Google

5 models

Google의 Gemini 제품군은 업계 최고 수준의 최대 2M tokens context window를 제공하는 최첨단 멀티모달 기능을 제공합니다.

xAI

3 models

Elon Musk의 AI 회사입니다. Grok model은 실시간 지식, 재치 있는 응답, 뛰어난 코딩 지원으로 잘 알려져 있습니다.

Alibaba (Qwen)

3 models

Alibaba의 Qwen 시리즈는 강력한 다국어 모델로, 영어와 중국어 작업 모두에서 뛰어난 성능을 제공합니다.

Zhipu AI (GLM)

3 models

Zhipu AI의 GLM 시리즈입니다. 최대 200K context window를 지원하는 고급 중국어-영어 이중언어 model입니다.

MiniMax

2 models

MiniMax의 M2 시리즈입니다. 강력한 다국어 기능과 함께 205K의 초장문 context를 지원합니다.

Xiaomi (MiMo)

2 models

Xiaomi의 MiMo V2 model입니다. 최대 1M Tokens의 대형 context window를 제공합니다.

Alibaba (Qwen3)

3 models

Alibaba의 Qwen3 시리즈입니다. 비전-언어 및 코딩 특화 기능을 갖춘 대규모 MoE model입니다.

Moonshot AI (Kimi)

3 models

Moonshot AI의 Kimi K2 시리즈입니다. 확장된 context window와 강력한 추론 기능을 제공합니다.

DeepSeek

6 models

DeepSeek의 최신 model입니다. 강력한 추론 및 코딩 기능을 갖춘 매우 비용 효율적인 선택입니다.

ByteDance (Seedance)

2 models

ByteDance의 Seedance 비디오 생성 model입니다. 오디오 지원과 함께 시네마급 품질의 text-to-video, image-to-video, 멀티모달 비디오 편집을 제공합니다.

ByteDance (Seedream)

3 models

ByteDance의 Seedream 이미지 생성 model입니다. 사실적이고 예술적인 스타일의 고품질 text-to-image를 제공합니다.

Kwaivgi (Kling)

2 models

Kwaivgi의 Kling 비디오 생성 model입니다. std/pro mode를 지원하는 고품질 text-to-video 및 image-to-video를 제공합니다. 길이 3–15s. std: $0.168/s, pro: $0.224/s (오디오 없음).

API Endpoints

POST /chat/completions

스트리밍 지원이 포함된 chat completion 생성

Headers

headers
Authorization: Bearer th-your-api-key
Content-Type: application/json

Request Body

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
}

POST /videos/generations

텍스트 또는 이미지 프롬프트로 비디오 생성 (Seedance & Wan 2.2 models)

Headers

headers
Authorization: Bearer th-your-api-key
Content-Type: application/json

Request Body

json
{
  "model": "bytedance/doubao-seedance-2.0",
  "prompt": "A golden retriever running on a sunny beach",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

Request Body (content array — first_frame & last_frame)

json
{
  "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"
}

Parameters

content (선택): 미디어 에셋 배열. 각 항목에는 다음이 포함됩니다:

  • type: "image_url"
  • image_url.url: 이미지의 URL
  • role: <firstFrame/> (최대 1개), <lastFrame/> (최대 1개), <refImage/>, <refVideo/>, <refAudio/>

GET /videos/generations/{id}

video generation 작업의 상태를 확인합니다

Headers

headers
Authorization: Bearer th-your-api-key

Response

json
{
  "id": "tsk-xxx",
  "object": "video.generation.task",
  "model": "bytedance/doubao-seedance-2.0",
  "status": "succeeded",  // "queued" | "running" | "succeeded" | "failed"
  "data": [
    {
      "video_url": "https://..."
    }
  ]
}

POST /images/generations

텍스트 프롬프트로 이미지를 생성합니다 (Seedream models)

Headers

headers
Authorization: Bearer th-your-api-key
Content-Type: application/json

Request Body

json
{
  "model": "bytedance/doubao-seedream-5.0",
  "prompt": "A serene mountain landscape at sunset",
  "n": 1,
  "size": "2048x2048"
}

GET /models

사용 가능한 모든 model을 나열합니다

코드 예제

cURL

bash
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!"}]
  }'

Python (OpenAI SDK)

python
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)

JavaScript / TypeScript

typescript
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);

스트리밍 예제 (Python)

python
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="")

도움이 필요하신가요?