HiDream O1
HiDream O1 is three models: hidream/o1-image-1.5 makes an image from a prompt, hidream/o1-edit-1.5 edits or combines up to six images, and hidream/o1-video-1.0 turns one image into a 10-second video.
The image and edit models take the OpenAI-compatible request of every image model and return one PNG. The video model is a job: submit it, poll it, then download the MP4. The rules every image request follows are on the Image generation page, and the rules of every video job on the Video generation page.

hidream/o1-image-1.5 through AI Hub on 2026-11-14. Compressed display copy; its prompt and request are under Text to image.Models
| Model | Mode | Call | Inputs and limits |
|---|---|---|---|
hidream/o1-image-1.5 | Text to image | POST /api/v1/images/generations, synchronous | Prompt up to 5,000 characters |
hidream/o1-edit-1.5 | Image edit | POST /api/v1/images/generations, synchronous | 1 to 6 images in input_references; prompt up to 8,000 characters |
hidream/o1-video-1.0 | Image to video | POST /api/v1/videos, a job | One first frame in frame_; prompt up to 8,000 characters; always 10 seconds |
- Each image reference is an
image_urlitem:{"type": "image_url", "image_url": {"url": "…"}}. Theurlis a public https URL or a base64 PNG or JPEGdata:URI. The image models return base64 only, so to reuse an output, send it back as adata:URI. - The image and edit models make one image per request (
n: 1) at 2K. - A video follows the shape of its first frame: a square image gives a square video. It has sound.
Pricing
These are list prices in USD. The rows are in each model's tokenhub_price_table on GET /api/v1/images/models and GET /api/v1/videos/models, and the Models page shows the same prices.
| Model | List price |
|---|---|
hidream/o1-image-1.5 | USD 0.08 per image |
hidream/o1-edit-1.5 | USD 0.10 per edit, plus USD 0.003 for each input image beyond the first |
hidream/o1-video-1.0 | USD 0.096667 per second: USD 0.96667 a 10-second video |
A video that fails is not priced.
Make a request
Send one POST /api/v1/images/generations request with the key in TOKENHUB_API_KEY. The response holds the image as base64 in data[0].b64_json; the examples decode it to a PNG file. Allow up to a minute for the image to be made.
| Field | Notes |
|---|---|
model | Required: hidream/o1-image-1.5 or hidream/o1-edit-1.5. |
prompt | Required. Up to 5,000 characters for the image model, 8,000 for the edit model. |
size | 2048x2048, the default. See Sizes. |
n | 1, the default. |
input_ | Edit model only, required: 1 to 6 image_url items. |
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "Wide landscape photograph in Finnish Lapland at night: vivid green and violet aurora borealis ribbons swirling across a star-filled sky above snow-laden spruce trees, a small glass-roofed log cabin glowing warm amber in the foreground, fresh untouched snow reflecting the aurora light, crisp polar air, ultra-detailed, natural colors, long-exposure astrophotography", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "cabin.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "Wide landscape photograph in Finnish Lapland at night: vivid green and violet aurora borealis ribbons swirling across a star-filled sky above snow-laden spruce trees, a small glass-roofed log cabin glowing warm amber in the foreground, fresh untouched snow reflecting the aurora light, crisp polar air, ultra-detailed, natural colors, long-exposure astrophotography", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > cabin.png
{ "created": 1794643152, "data": [{ "b64_json": "[base64 PNG data omitted]" }], "usage": { "cost": 0.08 } }
Text to image
These three images were made from a prompt alone with hidream/o1-image-1.5, through AI Hub on 2026-11-14, at 2048 × 2048. They are compressed WebP copies of the PNG responses; each new generation produces a different result. The people are AI-generated. Each Request block is the body that made the image.
Cabin under the aurora
hidream/o1-image-1.5Requested: size: "2048x2048" · USD 0.08 at list

Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "Wide landscape photograph in Finnish Lapland at night: vivid green and violet aurora borealis ribbons swirling across a star-filled sky above snow-laden spruce trees, a small glass-roofed log cabin glowing warm amber in the foreground, fresh untouched snow reflecting the aurora light, crisp polar air, ultra-detailed, natural colors, long-exposure astrophotography", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "aurora-cabin.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "Wide landscape photograph in Finnish Lapland at night: vivid green and violet aurora borealis ribbons swirling across a star-filled sky above snow-laden spruce trees, a small glass-roofed log cabin glowing warm amber in the foreground, fresh untouched snow reflecting the aurora light, crisp polar air, ultra-detailed, natural colors, long-exposure astrophotography", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > aurora-cabin.png
Glass igloos in Saariselkä
hidream/o1-image-1.5Requested: size: "2048x2048" · USD 0.08 at list

Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "Glass igloos scattered on a snowy hillside in Saariselkä, Finnish Lapland, under a spectacular corona of green and magenta northern lights radiating from the zenith, the Milky Way faintly visible, soft blue snow, warm lights inside the igloos, travellers silhouetted watching the sky, professional night-sky photography, sharp and natural", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "aurora-igloos.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "Glass igloos scattered on a snowy hillside in Saariselkä, Finnish Lapland, under a spectacular corona of green and magenta northern lights radiating from the zenith, the Milky Way faintly visible, soft blue snow, warm lights inside the igloos, travellers silhouetted watching the sky, professional night-sky photography, sharp and natural", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > aurora-igloos.png
Frozen lake and sauna
hidream/o1-image-1.5Requested: size: "2048x2048" · USD 0.08 at list

Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "A frozen lake in Finnish Lapland at midnight, a perfect mirror of thin ice reflecting curtains of emerald aurora borealis, snow-covered fells on the horizon, a lone red wooden sauna hut with smoke rising, a husky sled team resting on the shore, deep blue polar night, cinematic wide-angle photograph", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "aurora-frozen-lake.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "A frozen lake in Finnish Lapland at midnight, a perfect mirror of thin ice reflecting curtains of emerald aurora borealis, snow-covered fells on the horizon, a lone red wooden sauna hut with smoke rising, a husky sled team resting on the shore, deep blue polar night, cinematic wide-angle photograph", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > aurora-frozen-lake.png
Sizes
Send size: "2048x2048" or leave it out. The model list also names six other ratios (16:9, 9:16, 4:3, 3:4, 3:2 and 2:3). At present HiDream returns those images at a different size, so AI Hub refuses the result with 502 upstream_, and the request is not priced. Use the square size until this note is removed. A size outside the model's list is read as the nearest listed ratio at 2K, and the note above applies to every ratio but 1:1. A size that implies a tier below 2K is refused with 400 before the model is called, and costs nothing.
Image edit
Send 1 to 6 images in input_references with hidream/o1-edit-1.5, and say in the prompt what to change and what to keep. With several images, say how to combine them. Replace the reference URL in the request with your own public https URL or a base64 data: URI.
Add a reindeer herd
hidream/o1-edit-1.5Requested: size: "2048x2048" · one input image · USD 0.10 at list


Prompt: Keep the cabin, forest and aurora exactly as they are; add a small herd of reindeer with frosted antlers walking through the snow in the foreground, their breath visible in the cold air, lit softly by the green aurora glow
Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-edit-1.5", "prompt": "Keep the cabin, forest and aurora exactly as they are; add a small herd of reindeer with frosted antlers walking through the snow in the foreground, their breath visible in the cold air, lit softly by the green aurora glow", "n": 1, "size": "2048x2048", "input_references": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-cabin.webp" } } ] }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "aurora-reindeer.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-edit-1.5", "prompt": "Keep the cabin, forest and aurora exactly as they are; add a small herd of reindeer with frosted antlers walking through the snow in the foreground, their breath visible in the cold air, lit softly by the green aurora glow", "n": 1, "size": "2048x2048", "input_references": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-cabin.webp" } } ] }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > aurora-reindeer.png
Image to video
Submit POST /api/v1/videos with hidream/o1-video-1.0, a prompt and one image in frame_ with frame_type: "first_frame". Every video is 10 seconds: send duration: 10 or leave it out. Poll the job until it completes, then download the MP4 from GET /api/v1/videos/{id}/content, as the Video generation page shows. A job usually takes two to four minutes.
These two videos were made through AI Hub on 2026-11-14, each from one of the images above as its first frame.
Push-in to the cabin
hidream/o1-video-1.0Requested: 10 s · first frame: the cabin under the aurora image · USD 0.96667 at list
Prompt: Slow cinematic push-in toward the glowing log cabin as the aurora borealis ripples and dances overhead in waves of green and violet, stars twinkling, light snow drifting down, smoke curling gently from the chimney, calm and magical Arctic night
Request
const body = { "model": "hidream/o1-video-1.0", "prompt": "Slow cinematic push-in toward the glowing log cabin as the aurora borealis ripples and dances overhead in waves of green and violet, stars twinkling, light snow drifting down, smoke curling gently from the chimney, calm and magical Arctic night", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-cabin.webp" }, "frame_type": "first_frame" } ] }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/videos", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", "Idempotency-Key": process.env.TOKENHUB_IDEMPOTENCY_KEY, }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Video submit failed: " + response.status); const job = await response.json(); console.log(job.id, job.polling_url);
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/videos' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $TOKENHUB_IDEMPOTENCY_KEY" \ -d '{ "model": "hidream/o1-video-1.0", "prompt": "Slow cinematic push-in toward the glowing log cabin as the aurora borealis ripples and dances overhead in waves of green and violet, stars twinkling, light snow drifting down, smoke curling gently from the chimney, calm and magical Arctic night", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-cabin.webp" }, "frame_type": "first_frame" } ] }'
The igloo camp at night
hidream/o1-video-1.0Requested: 10 s · first frame: the glass igloos in saariselkä image · USD 0.96667 at list
Prompt: The northern lights come alive: green and magenta aurora curtains sweep and pulse across the sky above the glowing glass igloos, the small group of travellers points upward in awe, a slow cinematic camera rise over the snowy camp, stars sparkling, gentle wind lifting powder snow
Request
const body = { "model": "hidream/o1-video-1.0", "prompt": "The northern lights come alive: green and magenta aurora curtains sweep and pulse across the sky above the glowing glass igloos, the small group of travellers points upward in awe, a slow cinematic camera rise over the snowy camp, stars sparkling, gentle wind lifting powder snow", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-igloos.webp" }, "frame_type": "first_frame" } ] }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/videos", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", "Idempotency-Key": process.env.TOKENHUB_IDEMPOTENCY_KEY, }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Video submit failed: " + response.status); const job = await response.json(); console.log(job.id, job.polling_url);
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/videos' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $TOKENHUB_IDEMPOTENCY_KEY" \ -d '{ "model": "hidream/o1-video-1.0", "prompt": "The northern lights come alive: green and magenta aurora curtains sweep and pulse across the sky above the glowing glass igloos, the small group of travellers points upward in awe, a slow cinematic camera rise over the snowy camp, stars sparkling, gentle wind lifting powder snow", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/aurora-igloos.webp" }, "frame_type": "first_frame" } ] }'
Family husky ride
Two images of one scene made from a prompt with hidream/o1-image-1.5 on 2026-11-14, and a 10-second video made from each with hidream/o1-video-1.0 (2026-11-14 and 2026-11-15), all through AI Hub. The people are AI-generated.
Husky sled in the forest
hidream/o1-image-1.5Requested: size: "2048x2048" · USD 0.08 at list

Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "A happy family of four in colourful winter snowsuits riding a wooden sled pulled by a team of six husky dogs along a trail through a snow-laden spruce forest in Finnish Lapland at night, the children laughing with arms raised, green and violet northern lights glowing through the treetops above, powder snow flying from the dogs' paws, warm lantern on the sled, photorealistic, cinematic", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "family-husky-forest.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "A happy family of four in colourful winter snowsuits riding a wooden sled pulled by a team of six husky dogs along a trail through a snow-laden spruce forest in Finnish Lapland at night, the children laughing with arms raised, green and violet northern lights glowing through the treetops above, powder snow flying from the dogs' paws, warm lantern on the sled, photorealistic, cinematic", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > family-husky-forest.png
Husky sled on the forest trail
hidream/o1-image-1.5Requested: size: "2048x2048" · USD 0.08 at list

Request
import { writeFile } from "node:fs/promises"; const body = { "model": "hidream/o1-image-1.5", "prompt": "A family on a husky sled racing along a winding trail through a tall frosted pine forest in Lapland, Finland, a bright green aurora borealis curtain arching across the night sky above the trees, the parents steering and two kids waving, six huskies running in a line, snow sparkling in the lantern light, photorealistic, cinematic", "n": 1, "size": "2048x2048" }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Image request failed: " + response.status); const result = await response.json(); await writeFile( "family-husky-trail.png", Buffer.from(result.data[0].b64_json, "base64"), );
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/images/generations' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hidream/o1-image-1.5", "prompt": "A family on a husky sled racing along a winding trail through a tall frosted pine forest in Lapland, Finland, a bright green aurora borealis curtain arching across the night sky above the trees, the parents steering and two kids waving, six huskies running in a line, snow sparkling in the lantern light, photorealistic, cinematic", "n": 1, "size": "2048x2048" }' \ | jq -r '.data[0].b64_json' \ | python3 -c 'import base64, sys; sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read()))' \ > family-husky-trail.png
The ride through the forest
hidream/o1-video-1.0Requested: 10 s · first frame: the husky sled in the forest image · USD 0.96667 at list
Prompt: The husky team pulls the sled forward through the snowy spruce forest, the family cheering with arms raised, snow spraying from the dogs' paws, the lantern swinging, the camera tracking alongside the sled, green and violet northern lights rippling above the treetops, joyful winter adventure
Request
const body = { "model": "hidream/o1-video-1.0", "prompt": "The husky team pulls the sled forward through the snowy spruce forest, the family cheering with arms raised, snow spraying from the dogs' paws, the lantern swinging, the camera tracking alongside the sled, green and violet northern lights rippling above the treetops, joyful winter adventure", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/family-husky-forest.webp" }, "frame_type": "first_frame" } ] }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/videos", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", "Idempotency-Key": process.env.TOKENHUB_IDEMPOTENCY_KEY, }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Video submit failed: " + response.status); const job = await response.json(); console.log(job.id, job.polling_url);
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/videos' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $TOKENHUB_IDEMPOTENCY_KEY" \ -d '{ "model": "hidream/o1-video-1.0", "prompt": "The husky team pulls the sled forward through the snowy spruce forest, the family cheering with arms raised, snow spraying from the dogs' paws, the lantern swinging, the camera tracking alongside the sled, green and violet northern lights rippling above the treetops, joyful winter adventure", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/family-husky-forest.webp" }, "frame_type": "first_frame" } ] }'
Racing down the trail
hidream/o1-video-1.0Requested: 10 s · first frame: the husky sled on the forest trail image · USD 0.96667 at list
Prompt: The husky sled races toward the camera along the winding forest trail, the dogs running in rhythm, the parents waving and the children laughing, snow flying, the aurora curtain shimmering green above the tall pines, smooth cinematic camera pulling back
Request
const body = { "model": "hidream/o1-video-1.0", "prompt": "The husky sled races toward the camera along the winding forest trail, the dogs running in rhythm, the parents waving and the children laughing, snow flying, the aurora curtain shimmering green above the tall pines, smooth cinematic camera pulling back", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/family-husky-trail.webp" }, "frame_type": "first_frame" } ] }; const response = await fetch("https://tokenhub-api.belive.sg/api/v1/videos", { method: "POST", headers: { Authorization: "Bearer " + process.env.TOKENHUB_API_KEY, "Content-Type": "application/json", "Idempotency-Key": process.env.TOKENHUB_IDEMPOTENCY_KEY, }, body: JSON.stringify(body), }); if (!response.ok) throw new Error("Video submit failed: " + response.status); const job = await response.json(); console.log(job.id, job.polling_url);
curl --fail-with-body -sS 'https://tokenhub-api.belive.sg/api/v1/videos' \ -H "Authorization: Bearer $TOKENHUB_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $TOKENHUB_IDEMPOTENCY_KEY" \ -d '{ "model": "hidream/o1-video-1.0", "prompt": "The husky sled races toward the camera along the winding forest trail, the dogs running in rhythm, the parents waving and the children laughing, snow flying, the aurora curtain shimmering green above the tall pines, smooth cinematic camera pulling back", "duration": 10, "frame_images": [ { "type": "image_url", "image_url": { "url": "https://aihub.belive.sg/docs/examples/hidream/family-husky-trail.webp" }, "frame_type": "first_frame" } ] }'
Errors
These are checked before the model is called, so each one costs nothing. See Errors and recovery for the envelope and the retry rules.
Status and type | When |
|---|---|
400invalid_ | A size that implies a tier below 2K or is sent beside aspect_ratio or resolution, n other than 1, an edit with no image or more than six, a video without exactly one first frame, a duration other than 10, or a prompt over its limit. |
400unsupported_ | A field the model does not take, such as negative_ or generate_. |