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.
startwithreference_link(a share link or a direct link) or abreakdown_idmade with contents shot, story and asset, andquality(480p, 768p, 1088p or 1440p). The video comes out the way the reference video is (landscape when wider than tall); setorientation(portrait/landscape) for the other way, until the firstsubmit_body(then 409run_started). Landscape and portrait cost the same.resolutionis not taken (400resolution_not_taken: sendquality+orientation); a wrongorientationis 400invalid_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 andrecordevent: adaptwith the version they confirmed. Optionalbreakdown_model(minimaxorgrok): with it, the breakdown-v1 body innextcarries thatmodel; without it (and when Grok is available), the breakdown step hasmodels: [minimax, grok]andchoose: 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 400invalid_model; Grok unavailable is 400model_not_available. Video model and key: if the API key has model limits that leave the video model out,start(withvideo_model),plan,approve_budgetandsubmit_bodyanswer 403token_model_not_allowed(error.details.modelnames the model) before anything is charged. Pick a model this key allows andplanagain, 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.- Assets: the run lists what it needs (
needs). Animals count as characters; afacelesscharacter's picture is always optional; a voice is listed only for a character who speaks lines. A setting entry hasrole: setting,secondsandframes: each segment keeps one picture slot for its main setting. On a newplan, an original frame the user no longer ticks is dropped. Give each as{for, kind, source, id}:upload(the id fromPOST /uploads, free),generated(the link the image or voice tool returned) orsource_frame(an evidence frame of the original, only when the user ticked it; pass the ticked ids asticked_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_qualitynames the failed checks. With fields v2: a person seen only in part hasrole: partandpart(a picture of that part only, no face, no whole body); a prop an appeal needs on screen when it pays off carriesappeal(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 examplePR1:bitten), withprop,state,label,look,segments,frames,edit_from(the refs of the same prop's other states) andrecast. Sources: the user's upload; an original frame the user ticked (only a prop the adaptation did not recast has them); orPOST /v1/tools/imagefrom itslook, 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 400source_frame_not_allowed. - Budget:
planreturns 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[].seconds5–15;lengthis the real length). A shot longer than 15 s is already cut: its rows carrypartandpart_of, andquote.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 callapprove_budgetwith 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. - Segments, one at a time, segment 1 first:
submit_body ngives the exactPOST /v1/videosbody and itsIdempotency-Key; send it unchanged with the user's key, thenrecordsubmittedwith thetask_id. After the user watched it:recordaccepted, orredo. A segment that continues a shot needstail_frameof the one before first (n= the previous segment's number; the field isn, notsegment). After aredo, any of the segment's last 8 submitted takes can still beacceptedwith its task_id instead of paying for another redo; if the next segment was already made from another take's last frame, that answers 409tail_continuity: redo the next segment first. One task_id is one take: a task_id already recorded for another segment or take answers 409task_reused. assemblejoins the accepted segments (anra_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-v1edits, thenplanagain.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 andplanagain, 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-v1editsif 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 (therole: prop_stateentry in needs) keeps it steadier. 500internal_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 aticket, and do not retry over and over.
resume: an original frame the user no longer ticks is listed inreplace.assets(reason: not_ticked) with asource_frame_not_tickedwarning;submit_bodyanswers 409source_frame_not_allowedfor such a frame.
A run from the oldPOST /v1/tools/workflowanswers 400old_workflow_runhere; finish it on the old route.
Series mode: when the recorded adaptation is a series one,planfills 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, passseries{bible_id, version}toplan. Do not send your own picture for a series character (400asset_in_bible) unless it is this episode's own look: mark that itemlook_of_episode: true(it goes over the bible's main picture, never in its place).sourcecan bebible, withslotmain, day, night or look:<id>. A series asset with no usable picture is listed inmissing(and innext), 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 areason: a segment needs it as its first picture); generate and pick one in the bible, or add one with adapt-series-v1assets, thenplanagain.warningsgainsseries_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-v1edits, record the new version andplanagain.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-MiniH3-Skill-Version | header | string | no | The skill-pack version you use (in SKILL.md and the pack's VERSION file, plus one on every upgrade; the current one is |
action | body | string | yes | -startrecordplanapprove_budgetsubmit_bodytail_frameassemblenextresume |
series | body | object | no | plan, series mode: use a newer bible version on purpose |
run | body | object | no | Required except for start; the newest run, unchanged (rm_…, signed) |
reference_link | body | string | no | start: a TikTok, Douyin or XHS share link, or a direct video link |
breakdown_id | body | string | no | start(代替链接),或 record event breakdown / start (instead of the link), or record event breakdown |
quality | body | string | no | -480p768p1088p1440p |
orientation | body | string | no | start / plan: the video direction; left out, it follows the reference video; fixed after the first submit_body portraitlandscape |
breakdown_model | body | string | no | start: the breakdown model; without it the breakdown step asks the user minimaxgrok |
video_model | body | string | no | On minimax-h3-ref2vaminimax-h3-ref2va-plus |
model | body | string | no | record event breakdown: the model sent in the breakdown-v1 body; a refill keeps it minimaxgrok |
event | body | string | no | -fetchedbreakdownadaptsegment |
media_url | body | string | no | record fetched |
seconds | body | number | no | record fetched |
adaptation_id | body | string | no | record adapt |
version | body | integer | no | record adapt |
n | body | integer | no | Segment number |
status | body | string | no | -submittedacceptedredounknown |
task_id | body | string | no | POST /v1/videos 返回的 task_… / task_… as POST /v1/videos returned it |
assets | body | array<object> | no | - |
ticked_evidence | body | array<string> | no | - |
amount | body | number | no | approve_budget:用户同意的美元金额,不少于 quote.h3_total / approve_budget: USD the user agreed, at least quote.h3_total |
async | body | boolean | no | 只用于 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