Media Generation
WorldRouter generates both images and videos through the same API key and base URL. Pick the surface that matches the model you want to call — only the request body and response shape differ.
Images
Generate images through the OpenAI-compatible /v1/images/generations endpoint (gpt-image-2) or Gemini’s native generateContent route.
OpenAI-compatible
Generate images with gpt-image-2 through POST /v1/images/generations.
Gemini multimodal
Generate images with Gemini image models through Google's native generateContent route, forwarded 1:1.
Videos
Generate videos through WorldRouter’s native async task routes. Submit a job, poll until it finishes, then download the result.
Seedance video
Generate videos with Seedance through WorldRouter's native async task routes, including polling and asset-based workflows.
PixVerse video
Create PixVerse videos with pixverse-c1 and pixverse-v6 through WorldRouter's native PixVerse-compatible async routes.
MiniMax H3 video
Use MiniMax-H3 for either resolution. WorldRouter charges 25 Credits per successful 768P task or 37.5 Credits per successful 1080P task.
In the Playground, choose Video, then MiniMax H3. Select the card for your resolution and input mode to see its form and price per successful task. Both resolutions accept text alone or references. You can supply images, video or audio individually, in pairs, or all three together. The 768P tier also offers first-frame, last-frame and first-and-last-frame controls. Open the Playground
Enter a prompt and one public URL per line for each reference type you selected. Choose the duration and aspect ratio, then submit. Audio is on. The task and flat settings control the API response shape. The Playground polls for the finished video.
Send POST /v2/video_generation with a WorldRouter API key. WorldRouter deduplicates identical requests from the same caller during task retention. The optional Idempotency-Key header lets you identify a submission explicitly. Reuse it on retries or supply a fresh key to generate another video from the same inputs.
curl -X POST "https://inference-api.worldrouter.ai/v2/video_generation" \
-H "Authorization: Bearer $WORLDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [{"type": "text", "text": "A skyline reflected in still water."}],
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}'Save the returned task_id. Poll GET /v2/query/video_generation/{task_id} with the same API key. The default response places fields under task. When task.status reaches succeeded, download task.content.url. On failed, read task.error. Set response_format: "flat" at submission to receive those fields at the top level when polling.
On success, task.ratio reports the measured width and height in lowest terms. A 1920×1088 file returns 30:17. WorldRouter omits the field when it cannot read the output dimensions. Both task.duration and task.usage.output_seconds report complete seconds, using the provider’s actual duration first and the output file’s duration as a fallback. A duration of 10.9 seconds returns 10. Both fields are omitted if neither measurement is available.
If no result has been confirmed within 24 hours of submission, the task fails with task_expired. Only successful generations incur a customer charge.
| Setting | 768P | 1080P extension |
|---|---|---|
| Duration target | 4–15 seconds, plus a 1–3 second extension | 10–15 seconds |
| Text prompt | One non-empty text item, up to 7,000 characters | Same |
| Frame conditioning | First frame, last frame or both | Use reference images |
| Reference inputs | Up to 9 images, 3 videos and 3 audio clips | Same counts |
| Reference video length | At least 2 seconds per clip. Provider lists 4 seconds combined. | Provider lists up to 15 seconds per clip |
| Reference audio length | 2–15 seconds combined | Provider lists up to 15 seconds per clip |
Use a public HTTP(S) URL for media inputs. With an image, set role to first_frame, last_frame or reference_image. Reference videos use video_url and reference_video. Reference audio uses audio_url and reference_audio. Choose either frame conditioning or reference inputs for a task. Add the following item to the text prompt for an image reference.
{
"type": "image_url",
"image_url": { "url": "https://example.com/subject.jpg" },
"role": "reference_image"
}Text-only requests require an explicit ratio of 16:9, 9:16, 1:1, 4:3, 3:4 or 21:9. For frame conditioning, WorldRouter measures the input frame and selects the nearest of these six ratios. For reference inputs, supply a concrete ratio or choose adaptive (the default). With adaptive framing, WorldRouter measures the first reference image or video. Audio-only input defaults to 16:9.
Resolution, duration and ratio are generation targets. Three 2-second 768P reference clips completed together, beyond the provider’s stated 4-second total. At 1080P the following outputs were measured.
| Requested ratio | Observed 1080P output |
|---|---|
16:9 | A request with nine reference images produced 1920×1088 landscape video. |
9:16 | Three reference videos produced 1080×1920 portrait video. |
1:1 | Mixed image, video and audio references produced 1080×1080 square video. |
4:3 | A single reference image produced 1920×1088 landscape video. |
3:4, 21:9 | These requests have also produced 1920×1088 landscape video. |
The public ratio options listed above exclude the supplier’s 3:2 and 2:3 values. Download the generated file to verify exact dimensions and timing.
Some valid HEIC and HEIF references have failed during generation. Encoding the same image as JPEG succeeded with the same prompt, duration and ratio. JPG, PNG and WebP inputs have all produced videos.
Inline Base64 and MiniMax file IDs are unavailable on this route. The supported generation options are generate_audio: true and aigc_watermark: false, both defaults. Use polling for completion. Callback delivery, silent output, additional AIGC watermarking, 2K regeneration and H3-Context-IR are outside this route’s supported operations.
GET /v2/query/video_generation lists tasks created with the same key over the last seven days. Use page_num, page_size (1–100), filter.status, filter.task_ids, filter.model or filter.task_type to narrow the result. Each user can have up to three active tasks per team. DELETE /v2/video_generation/{task_id} cancels a queued task before dispatch or deletes a completed or failed task record. A task that has already been sent to the provider cannot be cancelled through this route.
WorldRouter exposes the 768P tier and a provider-specific 1080P extension. MiniMax’s official API offers additional resolutions and meters output video, reference video and reference images under its own pricing schedule. MiniMax V2 request reference · MiniMax API video pricing
Before you start
- Create a WorldRouter API key in the API Keys dashboard.
- Make sure the team has available credits on the Credits page.
- New to WorldRouter? Run through the Quickstart first for an API key, the base URL, and a connection test.