OpenAI-compatible API

One API key for China's leading AI models.

Use DeepSeek, Qwen, Kimi, GLM and MiniMax for text and code, and Kling and Wan for images and video. Keep your OpenAI code, change the base URL, and pay only for what you use.

37 models · Text, image and video · Pay as you go · Every charge in your usage log

Model families on TokenRoc

  • DeepSeek
  • Qwen
  • Kimi
  • GLM
  • MiniMax
  • Kling
  • Wan
  • Seedance
Model providers in the catalog
7
Output types: text, image and video
3
Lines to change in OpenAI SDK code
2
API key for every model
1

One account for every model you build with.

Text, images and video through one OpenAI-compatible API, one balance and one usage log.

Keep your OpenAI code

Set the TokenRoc base URL and a model ID. Switch between DeepSeek, Qwen, Kimi and more without new SDKs.

Read the quickstart

Text, image and video

Chat and code models, image generation up to 4K, and video with resolution and audio options.

How pricing works

Failed video tasks are refunded

Video charges are reserved when you submit and returned to your balance automatically if the task fails.

Video generation guide

Every charge in your log

Usage Logs show each request and its charge. Task Logs track every video task by ID.

Open Usage Logs

Already using the OpenAI SDK? Change two lines.

Set the base URL and choose a model. Keep your API key in an environment variable.

Python / OpenAI SDK 2 lines changed
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["TOKENROC_API_KEY"],
    base_url="https://api.tokenroc.com/v1",
)
response = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user",
               "content": "Say hello."}],
)
print(response.choices[0].message.content)
curl / Chat Completions
curl https://api.tokenroc.com/v1/chat/completions \
  -H "Authorization: Bearer $TOKENROC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {"role": "user", "content": "Say hello."}
    ]
  }'

Read the quickstart

Pick a model for your task.

Start with a task, then compare the model and its billing unit.

Text and code

DeepSeek V4 Flash

deepseek-v4-flash

$0.2329 input · $0.9314 output per 1M tokens

Low-cost everyday chat.

Details

Kimi K2.7 Code

kimi-k2.7-code

$0.7568 input · $3.1825 output per 1M tokens

Coding tasks and code questions.

Details

Qwen3.8 Max

qwen3.8-max

$1.7778 input · $5.3333 output per 1M tokens

Compare it on harder reasoning tasks.

Details
Text quickstart

Images

Kling v3 Image

kling/kling-v3-image-generation

$0.0269 per image

Generate images from a prompt or reference.

Details

Kling v3 Omni Image

kling/kling-v3-omni-image-generation

from $0.026866 per image

4K: $0.053731 per image.

Related image series, with output up to 4K.

Details
Image generation guide

Video

Wan 3.0

wan3.0-video

from $0.044807 per second

Turn a text prompt or image into video.

Details

Kling v3 Video

kling/kling-v3-video-generation

from $0.080597 per second

Guide a clip with a prompt or start and end frames.

Details
Video generation guide

Prices checked 16 October 2026. See all live prices in Model Square.

Image and video prices start at the base setting. Check resolution and audio options before sending a request.

From sign-up to first response in four steps.

  1. Create your account.

    Sign up with your email address.

  2. Add funds through secure checkout.

    Available payment methods are shown at checkout.

  3. Create an API key in the console.

    Copy your key and keep it private.

  4. Send your first request.

    Choose a model and run the quickstart.

Follow the quickstart

Clear billing, per unit.

Pay for what you use. Check each model's unit before you call it.

Text
Per 1M input and output tokens, with cheaper cached input on supported models.
Images
Per generated image. Some models charge more for higher resolution.
Video
Per second or per video, depending on the model. Some models bill by output video tokens. Video charges are reserved when you submit and refunded automatically if the task fails.
Usage logs
Every request and charge appears in your usage log.
How pricing works

Check status. Find answers. Get help.

Status

Check whether the website and API gateway respond right now.

Contact

Send an API, account or billing question to TokenRoc.

Questions before your first request.

Is TokenRoc compatible with the OpenAI SDK?

Yes for text through Chat Completions. Keep your OpenAI SDK, set the TokenRoc base URL and API key, and choose a supported model ID. Images and video use the endpoints in the docs.

Which models can I use?

The catalog includes DeepSeek, Qwen, Kimi, GLM and MiniMax for text and code, and Kling and Wan for images and video. Model Square lists the available models and live prices.

How does billing work?

Text is billed by input and output tokens, with cheaper cached input on supported models. Images are billed per generated image. Video billing depends on the model. You add funds and pay for what you use.

How do I add funds?

Add funds through our secure checkout. Available payment methods are shown at checkout.

What happens if a video task fails?

If the task ends with status failed, the reserved charge is returned to your balance automatically. If your script stops waiting, the task may still be running. Check the same task ID before sending another request.

Where can I see my usage?

Usage Logs in the console show each request and its charge. Task Logs show video task IDs and statuses. The dashboard summarizes account activity.

Latest articles

View all articles

Start building with one API key.