POST /v1/dramas creates a drama from a brief or a script and starts episode 1. Each episode is a workflow run (geekidea/drama-episode): GEEKIDEA writes the story, designs the looks, draws reference images, plans the storyboard, renders keyframes and clips, and cuts the final video. Progress, confirmation, redo and cancellation use the /v1/workflow_runs endpoints.
Create a drama
GET /v1/workflow_runs/{run_id}, its event stream or webhooks.
POST /v1/dramas/quote takes the same body and saves nothing. It returns estimated_cost_usd, the amount held when the drama is created (split into model_cost_usd and fee_usd), the steps in that first segment, episode_cost_usd for the whole of episode 1, and within_budget when you sent budget_usd. Before the outline and storyboard exist the number of characters and clips is unknown, so the estimate is based on defaults and the episode length and errs high. Creating returns 402 when your balance is below estimated_cost_usd.
Steps
Each episode runs these steps in order:
With
auto_confirm: true no step stops. Skipped steps are not charged.
When the run stops in waiting_input, review the episode, edit artifacts if you like, then call POST /v1/workflow_runs/{id}/confirm. Redo a step with POST /v1/workflow_runs/{id}/steps/{stepKey}/redo and cancel with POST /v1/workflow_runs/{id}/cancel.
Dramas and episodes
The next episode can start only when the previous one is
completed and the planned count is not reached; otherwise it returns 409 workflow_invalid_state. With auto_continue: true this happens automatically.
Episode status is producing, waiting_input, completed, failed or cancelled. Drama status is draft, producing, completed or archived.
Artifacts
Text outputs are versioned artifacts.kind is one of brief, outline, plot, asset_check, look and storyboard. brief and outline are shared by the whole drama.
payload is the whole new content, in the same structure as the payload you read. Updating or restoring resets the steps that depend on the artifact and puts the run back in waiting_input; confirm to continue with the new content. Invalid content returns 400 invalid_parameter, a running run returns 409 workflow_invalid_state, and brief and outline can only be changed on episode 1.
An artifact version has kind, step, version, current, schema_version, source (generated or edited), feedback, payload and created_at.
Elements
GET /v1/dramas/{id}/elements returns the drama’s characters, scenes and props. Each has a code, kind (character, scene or prop), name, description and looks; each look has from_episode_no, label, description, image and, for characters, turnaround.
Media
Every image and video of an episode is a media slot (dmedia_…) with versions. category is character, turnaround, scene, prop, keyframe, clip, final, cover or poster.
- Regenerate works on
character,turnaround,scene,prop,keyframe,clipandposter. It opens its own charge (kindmedia) for that one item’s model cost and feature fee (one image, or the clip’s seconds; the poster has no feature fee), and does not reset any step. - Upload works on
character,turnaround,scene,prop,keyframeandposter, and is free. - When a new version becomes current, media made from it are marked
stale: true. Regenerate them if you want; the final video is not re-cut automatically. - Regenerate, adopt and upload return
409 workflow_invalid_statewhile the run is running. Regenerate also returns409while the item is already regenerating.
version, status (generating, succeeded or failed), source (generated, regenerated, uploaded or composed), file, generation_id, prompt, feedback, error_code and created_at. File urls are signed and expire; query again for fresh links.
