Most apps start with text. Then someone asks for a cover image, and later a short clip. If each type needs its own account, key and bill, the glue code grows fast. On TokenLab, chat, image and video requests use one API key and one prepaid balance. This page shows the three calls and the prices read on 2026-11-11. Prices change, so check the live numbers before you budget.
What is behind one key
TokenLab lists chat, image and video models in one model catalog. Each type has its own endpoint, and all of them take the same Authorization: Bearer header:
- Chat:
POST https://api.tokenlab.sh/v1/chat/completions(OpenAI SDK compatible) - Image:
POST https://api.tokenlab.sh/v1/images/generations - Video:
POST https://api.tokenlab.sh/v1/videos/generations, which is asynchronous
1. Text
curl https://api.tokenlab.sh/v1/chat/completions \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Write a one-line product tagline."}]}'
2. Image
The same key works for images. This uses nano-banana-2 at 1k resolution:
curl https://api.tokenlab.sh/v1/images/generations \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"nano-banana-2","prompt":"A flat illustration of a lighthouse at dawn","resolution":"1k"}'
Image requests can take close to a minute at high resolution, so set your HTTP client timeout to at least 120 seconds. This comes from the Create Image reference. The result is in data[].url or data[].b64_json.
3. Video
Video takes longer, so the create call returns a task, not a file. You get a task_id and a poll_url. Call that URL until the task reaches a final status.
import os, time, requests
base = "https://api.tokenlab.sh"
headers = {"Authorization": f"Bearer {os.environ['TOKENLAB_API_KEY']}"}
task = requests.post(f"{base}/v1/videos/generations", headers=headers, json={
"model": "grok-imagine-video",
"operation": "text-to-video",
"prompt": "A paper boat drifting down a rainy street, soft light",
"duration": 5,
"resolution": "720p",
}).json()
while True:
status = requests.get(base + task["poll_url"], headers=headers).json()
if status.get("status") in ("completed", "failed", "timeout"):
break
time.sleep(5)
if status["status"] == "completed":
print(status["video_url"])
else:
print(status)
On success, the video URL is in video_url. The exact result fields are in the Create Video reference.
What it costs (read 2026-11-11)
| Model | Unit | Verified tier | Official tier |
|---|---|---|---|
claude-sonnet-5-5 | per 1M tokens, input / output | $0.7 / $3.5 | $2 / $10 |
nano-banana-2, 1k | per image | $0.0335 | $0.067 |
grok-imagine-video, 720p | per second | $0.025 | $0.05 |
So $10 of balance buys about 298 images at 1k, or about 80 five-second videos (5 × $0.025 = $0.125 each) on the Verified tier. All three models are available on Verified and Official delivery. See the delivery tiers guide for what that means. Sending an input image to the video model adds $0.001 per image on Verified ($0.002 on Official). Other models and resolutions cost different amounts, so check the model catalog for the exact one you use.
Using it from an agent
If you work in Claude Code or OpenClaw, you do not need to write this code. The TokenLab MCP server has create_image and create_video tools. The setup is on the image and video MCP page.
Try it with a small balance
Put $5 to $10 on an account and run the three calls above. Compare cost per result with what you pay now, and keep your current provider until the numbers hold up. Create a key. If you are comparing gateways, read OpenRouter alternatives in 2026 too.
Sources: TokenLab model list and pricing API, and the TokenLab API reference for images and videos (read 2026-11-11).