Capabilities

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.

A log cabin with a glass roof glowing amber in deep snow among frosted spruce trees, under swirling green and violet northern lights and the Milky Way.
Cabin under the aurora: 2048 × 2048, made with 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

ModelModeCallInputs and limits
hidream/o1-image-1.5Text to imagePOST /api/v1/images/generations, synchronousPrompt up to 5,000 characters
hidream/o1-edit-1.5Image editPOST /api/v1/images/generations, synchronous1 to 6 images in input_references; prompt up to 8,000 characters
hidream/o1-video-1.0Image to videoPOST /api/v1/videos, a jobOne first frame in frame_images; prompt up to 8,000 characters; always 10 seconds
  • Each image reference is an image_url item: {"type": "image_url", "image_url": {"url": "…"}}. The url is a public https URL or a base64 PNG or JPEG data: URI. The image models return base64 only, so to reuse an output, send it back as a data: 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.

ModelList price
hidream/o1-image-1.5USD 0.08 per image
hidream/o1-edit-1.5USD 0.10 per edit, plus USD 0.003 for each input image beyond the first
hidream/o1-video-1.0USD 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.

FieldNotes
modelRequired: hidream/o1-image-1.5 or hidream/o1-edit-1.5.
promptRequired. Up to 5,000 characters for the image model, 8,000 for the edit model.
size2048x2048, the default. See Sizes.
n1, the default.
input_referencesEdit 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"),
);
json (truncated response excerpt)
{
  "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.

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_error, 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.5

Requested: size: "2048x2048" · one input image · USD 0.10 at list

A log cabin with a glass roof glowing amber in deep snow among frosted spruce trees, under swirling green and violet northern lights and the Milky Way.
Input: the cabin from Text to image.
The same cabin, forest and northern lights, with six reindeer standing in the snow in front of the cabin, lit green by the aurora.
Output.

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"),
);

Image to video

Submit POST /api/v1/videos with hidream/o1-video-1.0, a prompt and one image in frame_images 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.

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.

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 typeWhen
400
invalid_request
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.
400
unsupported_parameter
A field the model does not take, such as negative_prompt or generate_audio.