MiniH3
EnglishWorkflows

Remake v1 workflow

中文

POSThttps://api.minih3.dev/v1/tools/remake-v1

Purpose: a free workflow that remakes one video as new H3 segments and joins them into a final video. It plans the calls; you make them with the user's own key, and each one is billed as itself (fetch, breakdown-v1, adapt-v1, image, voice and each POST /v1/videos). Prices on /catalog. Use a key with a spending cap: the user's quota is the real hard limit.
Rules: send the newest run back, unchanged, with every action; each answer returns a new one. Always use the run the latest call returned: submit_body returns a new run too, so record submitted with that one, not the run from before submit_body. Follow next.

  1. start with reference_link (a share link or a direct link) or a breakdown_id made with contents shot, story and asset, and quality (480p, 768p, 1088p or 1440p). The video comes out the way the reference video is (landscape when wider than tall); set orientation (portrait / landscape) for the other way, until the first submit_body (then 409 run_started). Landscape and portrait cost the same. resolution is not taken (400 resolution_not_taken: send quality + orientation); a wrong orientation is 400 invalid_orientation. A remake always runs the shot, story and asset breakdown first, then adapt-v1 to the shots stage; show each adapt stage to the user and record event: adapt with the version they confirmed. Optional breakdown_model (minimax or grok): with it, the breakdown-v1 body in next carries that model; without it (and when Grok is available), the breakdown step has models: [minimax, grok] and choose: ask the user which model to use first (MiniMax: the default, cheaper than Grok; Grok: hears sound and rhythm, reads story, emotion and mood in more detail, pricier), quote both from /catalog, and add "model": "grok" to that body if they pick Grok. A bad value is 400 invalid_model; Grok unavailable is 400 model_not_available. Video model and key: if the API key has model limits that leave the video model out, start (with video_model), plan, approve_budget and submit_body answer 403 token_model_not_allowed (error.details.model names the model) before anything is charged. Pick a model this key allows and plan again, or edit the key in the console and add the model to its model list (or use a key without model limits), then call again.
  2. Assets: the run lists what it needs (needs). Animals count as characters; a faceless character's picture is always optional; a voice is listed only for a character who speaks lines. A setting entry has role: setting, seconds and frames: each segment keeps one picture slot for its main setting. On a new plan, an original frame the user no longer ticks is dropped. Give each as {for, kind, source, id}: upload (the id from POST /uploads, free), generated (the link the image or voice tool returned) or source_frame (an evidence frame of the original, only when the user ticked it; pass the ticked ids as ticked_evidence). Files are checked (voice: at least 24 kHz, 128 kbps, 2-15 s of clear voice; images: at least 256 px on the short side); asset_quality names the failed checks. With fields v2: a person seen only in part has role: part and part (a picture of that part only, no face, no whole body); a prop an appeal needs on screen when it pays off carries appeal (AP ids); each key prop whose state changes gets one optional picture per state it starts a segment in: role: prop_state, ref <prop ref>:<state> (for example PR1:bitten), with prop, state, label, look, segments, frames, edit_from (the refs of the same prop's other states) and recast. Sources: the user's upload; an original frame the user ticked (only a prop the adaptation did not recast has them); or POST /v1/tools/image from its look, editing the picture of another state when you have one; each picture costs the image price on /catalog. An original frame is a reference only for its own entry; for another ref it is 400 source_frame_not_allowed.
  3. Budget: plan returns a quote (the H3 seconds at the live price, plus an estimate for images and voices still to make, shown apart). Each segment is asked in whole seconds, rounded up (segments[].seconds 5–15; length is the real length). A shot longer than 15 s is already cut: its rows carry part and part_of, and quote.long_shots[] (shot, seconds, parts, segments, h3_seconds, with_other_rows?) gives the H3 seconds a cut shot takes. warnings: see the list below. Show it and call approve_budget with the amount the user agreed (at least the H3 total). When you redo a segment, an earlier take that failed (failed takes are refunded in full) no longer counts against the budget.
  4. Segments, one at a time, segment 1 first: submit_body n gives the exact POST /v1/videos body and its Idempotency-Key; send it unchanged with the user's key, then record submitted with the task_id. After the user watched it: record accepted, or redo. A segment that continues a shot needs tail_frame of the one before first (n = the previous segment's number; the field is n, not segment). After a redo, any of the segment's last 8 submitted takes can still be accepted with its task_id instead of paying for another redo; if the next segment was already made from another take's last frame, that answers 409 tail_continuity: redo the next segment first. One task_id is one take: a task_id already recorded for another segment or take answers 409 task_reused.
  5. assemble joins the accepted segments (an ra_ job, free; poll it every 10 seconds). Segments and the final are kept 24 hours, for this account only. Warnings (warnings):
  • exceeds_single_call: this segment is longer than 15 s, so one call cannot make it and the rest is lost; tell the user before you quote.
  • prompt_over_limit: this segment's prompt is over H3's length limit and H3 will refuse it; shorten it with adapt-v1 edits, then plan again.
  • images_not_used: this segment has no picture slot left for the listed images, so it draws them from their text.
  • setting_picture_suggested: this setting is in several segments but has no picture; adding one keeps the place the same across them.
  • source_frame_not_ticked: the user no longer ticks these original frames; replace them with an uploaded or generated picture and plan again, or have the user tick them again.
  • multi_speaker_main_voice_only: Several characters speak in this segment; only the one who speaks most uses the voice you gave, and the others use a voice H3 makes for them. The others' voices may come out sounding a little like it.
  • language_tag_fallback: A line in this segment has no language set, so it is read in the video's dialogue language. If that is wrong, set the line's language and run again.
  • segment_copy_expired: Our saved copy of these accepted segments has expired (we keep it for 24 hours after a segment is accepted, so assemble within that time). Assembling tries to fetch them again; any segment that can't be fetched must be made again (redo), and a redo is a new generation, billed again by its seconds.
  • vfx_high_risk (segment, effects): this segment has an effect H3 often draws badly or leaves out (fire, an explosion, breaking glass...). Watch the segment, and redo it or make the shot's action simpler with adapt-v1 edits if the effect fails.
  • prop_state_without_tail (segment, props: ref, before, after): a key prop's state changes or must hold across these two segments, but this segment cannot start from the last frame of the one before (the tail-frame chain breaks every few segments). The prompt states each prop's state; a picture of that state (the role: prop_state entry in needs) keeps it steadier. 500 internal_error: the segment prompts could not be built (for example a recast prop would still go by its old name). Nothing is charged; send the time and the run in a ticket, and do not retry over and over.
    resume: an original frame the user no longer ticks is listed in replace.assets (reason: not_ticked) with a source_frame_not_ticked warning; submit_body answers 409 source_frame_not_allowed for such a frame.
    A run from the old POST /v1/tools/workflow answers 400 old_workflow_run here; finish it on the old route.
    Series mode: when the recorded adaptation is a series one, plan fills the final pictures and voices of series characters, settings and props from the series bible by asset id (at the bible version the episode was adapted with); to use a newer version on purpose, pass series {bible_id, version} to plan. Do not send your own picture for a series character (400 asset_in_bible) unless it is this episode's own look: mark that item look_of_episode: true (it goes over the bible's main picture, never in its place). source can be bible, with slot main, day, night or look:<id>. A series asset with no usable picture is listed in missing (and in next), each {ref, asset, code}: bible_picture_missing (no usable final picture in the bible), bible_frame_not_ticked (the final picture comes from an original frame the user did not tick), recast_no_source_frame (a recast character cannot use an original frame), segment_needs_image (with a reason: a segment needs it as its first picture); generate and pick one in the bible, or add one with adapt-series-v1 assets, then plan again. warnings gains series_old_name (segment, old, where: dialogue or action): this segment's prompt may still use an old name of a series character; it is not a blocker and the prompt is not changed; check it with the user, and if it is wrong change that line or action with adapt-v1 edits, record the new version and plan again.

Parameters

NameInTypeRequiredDescription
X-MiniH3-Skill-Versionheaderstringno

The skill-pack version you use (in SKILL.md and the pack's VERSION file, plus one on every upgrade; the current one is 13). Compared as numbers, segment by segment (10 is newer than 9, 2 equals 2.0). When it is missing, not numeric or older than the current pack, the answer adds the X-MiniH3-Notice header, and a 2xx JSON answer of /v1/tools/* also adds the minih3_notice field; the result is unchanged, never an error, never an extra charge.

actionbodystringyes-
startrecordplanapprove_budgetsubmit_bodytail_frameassemblenextresume
seriesbodyobjectno

plan, series mode: use a newer bible version on purpose

runbodyobjectno

Required except for start; the newest run, unchanged (rm_…, signed)

reference_linkbodystringno

start: a TikTok, Douyin or XHS share link, or a direct video link

breakdown_idbodystringno

start(代替链接),或 record event breakdown / start (instead of the link), or record event breakdown

qualitybodystringno-
480p768p1088p1440p
orientationbodystringno

start / plan: the video direction; left out, it follows the reference video; fixed after the first submit_body

portraitlandscape
breakdown_modelbodystringno

start: the breakdown model; without it the breakdown step asks the user

minimaxgrok
video_modelbodystringno

On plan you may pass video_model: "minimax-h3-ref2va-plus": same price as ref2va, 480p / 768p only, and every segment needs a reference image.

minimax-h3-ref2vaminimax-h3-ref2va-plus
modelbodystringno

record event breakdown: the model sent in the breakdown-v1 body; a refill keeps it

minimaxgrok
eventbodystringno-
fetchedbreakdownadaptsegment
media_urlbodystringno

record fetched

secondsbodynumberno

record fetched

adaptation_idbodystringno

record adapt

versionbodyintegerno

record adapt

nbodyintegerno

Segment number

statusbodystringno-
submittedacceptedredounknown
task_idbodystringno

POST /v1/videos 返回的 task_… / task_… as POST /v1/videos returned it

assetsbodyarray<object>no-
ticked_evidencebodyarray<string>no-
amountbodynumberno

approve_budget:用户同意的美元金额,不少于 quote.h3_total / approve_budget: USD the user agreed, at least quote.h3_total

asyncbodybooleanno

只用于 assemble / assemble only

Code samples

curl -X POST "https://api.minih3.dev/v1/tools/remake-v1" \
  -H "Authorization: Bearer $MINIH3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "start",
  "breakdown_id": "bi_…",
  "quality": "768p"
}'

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 new run and next; plan adds quote, submit_body adds body and headers, assemble adds final

202

assemble queued (ra_)

400

Error

403

Error

404

Error

409

Error

429

Error

500

Error

503

Error