MiniH3
EnglishWorkflows

Remake workflow (older, still available)

中文

POSThttps://api.minih3.dev/v1/tools/workflow

Older, still available: it works and is billed as before. New integrations use POST /v1/tools/remake-v1 (remake-v1). With an old skill pack the answer carries a minih3_notice update reminder.
Purpose: turn a shot list into H3 segment tasks, submit and accept them one by one, chain tail frames, and assemble the final video. The server keeps no state; progress lives in run.
Billing: the workflow is free. Each segment is submitted by your Agent with your own key via POST /v1/videos, and billed there at the normal H3 price.
Usage:

  1. plan: pass the object returned by the shotlist tool, pick quality (480p / 768p / 1088p / 1440p) and mode (original or adapted), optionally assets (images and voices replacing characters, scenes, props) and lines (rewritten dialogue).
  2. Pass back the run from the previous step unchanged every time. It is signed: an edited run returns 400 run_tampered; someone else's returns run_not_yours.
  3. submit_body: pass segment; returns the request body and Idempotency-Key for that segment. It does not submit anything; you call /v1/videos yourself.
  4. record: report a segment event; event is submitted (with the task_id /v1/videos returned), accepted, redo (new seed, optional new prompt) or unknown. When the task is done, watch it with GET /v1/videos/{task_id}/content using your own key, then record accepted or redo. accepted comes after submitted; the workflow then checks by task_id that this is a finished H3 task on your own account and keeps a copy of the segment for 24 hours from then. done is the old name of accepted and still works. video_url is no longer used and is ignored. Later segments can be submitted only after segment 1 is accepted.
  5. tail_frame: call it only when next lists it (only when one long shot continues into the next segment); it grabs the last frame of a finished segment for the next one. Calling it again for the same take returns the frame already made.
  6. assemble: once every segment is accepted, join them into the final video. Calling it again with the same segments returns the same video, while its link is still valid, without joining again.
  7. next / resume: only return what to do next. Errors:
  • 409 segment_archiving: the video is still being prepared; record again after 5 seconds.
  • 400 segment_failed: this H3 task failed; record redo.
  • 400 segment_expired: the video is past its 24-hour retention; redo this segment, and the new generation is billed at the normal H3 price.
  • 400 segment_not_found: no H3 video with this task_id on your account.
  • 400 missing_task_id: the segment has no task_id (an old run); record submitted with the task_id, then accepted again.
  • 400 task_mismatch: the task_id is not the one recorded when the segment was submitted.
  • 400 not_submitted: the segment has not been recorded submitted (or was just redone); record submitted with the task_id first.
  • 400 invalid_task_id: use the id POST /v1/videos returned (task_…).
  • 400 too_large: the segment's video is larger than the workflow accepts.
  • 429 busy: another assemble or tail frame is running (your own last one, or the service is busy); retry in a minute.
  • 429 rate_limited: you have used this hour's tail frames and assembles; retry after the Retry-After seconds returned.
  • 502 storage_error, 503 tool_unavailable: the segment cannot be read right now; retry later. On-screen text: the remake draws only text that is physically in the scene (signs, packaging, screens), on the object that carries it. Subtitles, title cards, name cards, watermarks and other text added in editing are never drawn.
    New plan parameters: dialogue_language (the spoken language, e.g. zh, ms, en; defaults to what the shot list heard) and orientation (portrait or landscape; defaults to the reference video); lines may set one line language: {"3": {"text": "Selamat pagi", "language": "ms"}}. assets values are {image_url, voice_url, description}, where description is the look of your own character; only the main characters (those who speak or are on screen longest, at most 7) need an image; the rest are optional. At 1088p and 1440p every segment needs at least one image; missing ones are listed in missing_assets. The final video keeps the segment resolution, and a one-segment run is delivered as that segment. Each next item has do, action and how; follow them. Errors: 400 invalid_language, invalid_orientation, invalid_shotlist, invalid_lines, invalid_asset, with the field named in the message.

Parameters

NameInTypeRequiredDescription
actionbodystringyes-
plannextresumerecordsubmit_bodytail_frameassemble
shotlistbodyobjectno

Required for plan, the shotlist tool's result

qualitybodystringno-
480p768p1088p1440p
modebodystringno-
originaladapted
assetsbodyobjectno

Keyed by replaceable ids, values {image_url, voice_url} (https)

linesbodyobjectno

New lines keyed by line number

runbodyobjectno

Required except for plan; the previous run, unchanged

segmentbodyintegerno

Segment number, from 1

eventbodystringno

done is the old name of accepted

submittedacceptedredounknowndone
task_idbodystringno

Required for submitted: the id POST /v1/videos returned (task_…)

video_urlbodystringno

Ignored; the workflow reads segments by task_id

promptbodystringno

Optional new prompt for redo

Code samples

curl -X POST "https://api.minih3.dev/v1/tools/workflow" \
  -H "Authorization: Bearer $MINIH3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "plan",
  "quality": "768p",
  "mode": "original",
  "shotlist": {
    "shots": [
      "…"
    ],
    "replaceable": {
      "characters": [
        {
          "id": "C1"
        }
      ]
    }
  },
  "assets": {
    "C1": {
      "image_url": "https://example.com/teapot.png"
    }
  }
}'

Try it

Kept in this browser tab only (sessionStorage) and sent straight to api.minih3.dev; it never reaches this site.

Enter your key to send.

Responses

200

The updated run and next steps

{
  "run": {
    "workflow": "minih3-wf-remake",
    "run_id": "wf_0123456789abcdef",
    "segments": [
      "…"
    ],
    "signature": "…"
  },
  "next": [
    {
      "do": "submit_body",
      "action": "submit_body",
      "how": "…"
    }
  ]
}

400

Error

409

Error

429

Error

500

Error

502

Error

503

Error