APIリファレンス · Media
Video · assemble a template
Put the rendered shots of a several-shot template back into its clip — one clip, over the clip's own sound.
Free — the shots were billed. Render each shot of the template first (POST /v1/videos/edits with source: "template:<id>:<n>"), then send their job ids here in shot order, right away: the cut waits for shots still rendering. A shot you left out or that failed (refunded) plays as filmed; when every shot failed it answers 400 pieces_failed.
Returns a job to poll like any render (GET /v1/videos/generations/{id}); the finished clip lands in your library. voice: "female" lays it over the clip's female-voice version (the template's voices.female) — for a woman cast in the man's part.
Answers 404 template_not_found for a template without shots, 400 pieces_mismatch when the number of pieces is not the number of shots, 404 piece_not_found for a job that is not a video edit of your workspace, 400 private_piece for a private render (never stored), 503 assembly_unavailable when cutting is down.
リクエストボディ
The template's id (GET /v1/videos/templates), one with shots.
The shots' edit job ids, in shot order — null for a shot you did not render.
female: the clip's female-voice version under the cut.
The clip's title in your library — the template's name by default.
curl https://eroq.ai/v1/videos/edits/assemble \
-H "Authorization: Bearer $EROQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "gta-goodbye",
"pieces": [
"8f3c2a10-…",
"0b7e91d4-…",
"c41f6a77-…"
],
"voice": "female",
"title": "Goodbye GTA with Mara"
}'レスポンス
{
"id": "5d1e7b3a-…",
"object": "video.edit",
"created": 1794600000,
"status": "processing",
"model": "eroq-replace-pro",
"duration": "22s",
"poll": "/v1/videos/generations/5d1e7b3a-…",
"usage": { "credits_spent": 0, "credits_remaining": 1840 }
}