Skip to main content
Base URL: https://router.flatkey.ai Use MiniMax-H3 when you need text-to-video, first- and last-frame control, or image, video, and audio references. Every request follows the same asynchronous workflow: create a task, poll its status, then download the finished MP4.

Flexible inputs

Generate from text, frame images, or reference images, videos, and audio.

One async workflow

Create with POST /v1/videos, poll with GET /v1/videos/{task_id}, and download from metadata.url.
Use this header for task creation and status requests:
Keep your API key private. Do not paste it into public logs, pages, or support tickets.

Create your first H3 video

1. Submit a text-to-video task

Send POST /v1/videos with the MiniMax-H3 model and a text prompt. Text-only requests require an explicit aspect ratio other than adaptive.
The response contains the public task ID in both id and task_id:
Save the returned task_... value. You need it to check the task later.

2. Poll and download the result

Poll GET /v1/videos/{task_id} until status becomes completed or failed. When it is completed, read the temporary download URL from metadata.url.
metadata.url is a temporary download URL. It works without a Flatkey authorization header, so anyone who has it can access the generated video until it expires. Treat it as private, and do not log, publish, or share it. Download the video promptly and store it in your own storage. Repeating the task query does not refresh an expired URL.

Choose your inputs

Every request must contain a non-empty text item. You can add frame images or reference media to control the result.
Do not mix first- or last-frame inputs with reference inputs in the same request. Each content item must contain exactly one payload that matches its type.

Control the first and last frames

Use first_frame and last_frame when you want the video to interpolate between two images.

Generate with reference media

Reference inputs help preserve a subject, motion style, or sound. Reference audio cannot be the only media input.

Request settings

When a request contains media and omits ratio, Flatkey uses adaptive. A text-only request must explicitly use a non-adaptive ratio.

Understand task results

For H3 video responses, the shared usage field names represent seconds:
  • usage.completion_tokens is the generated output duration.
  • usage.total_tokens is the total billable duration, including reference-video input time.
These values are seconds, not language-model tokens. Check Usage Logs in the Flatkey Console for the final charge.

Current limitations

  • callback_url is not supported. Poll the task status instead.
  • Task listing, cancellation, deletion, regeneration, and remix are not supported.
  • MiniMax-H3-Context-IR is not supported.
  • Remote media URLs must remain reachable while the task is being processed.