Where things stand and what to do next; start and resume here.
Always reports the account: plan, credits, credits held by running jobs,
and credits_available to spend. project_id adds the project's settings,
each step's state and web link, jobs with readable errors, export_url,
next_step and, when something failed, failures: the last failed jobs and
the failed segments grouped by kind and error. channel_id reports the channel style instead:
analysis_done, inputs_stale, templates, templates_stale and next_step.
Without API access it reports only the account and
subscription_needed: pass that on to the user.
輸入參數waitchannel_idproject_id
Show a Framesail image inline: a segment image, reference image,
style template or preset preview.
輸入參數url必填
get_generation_options
Get generation options
What a generate call can be told to use.
models: the allowed models with credit estimates and settings_schema
(the valid settings keys); is_default marks the default (the account's
saved choice, else Framesail's). Voice and clip models come in families,
each with its own default: pass provider or talking_head for one family.
prompt_sections: sections with entity_backed=false can be overridden
with editable_sections; entity_backed=true sections show the item's own
content (description, prompts, text, brief): change it with the edit
tools.
輸入參數action必填providergeneration必填talking_head
The account's default model and settings for one kind of generation,
used when neither the call nor the item's prompt editor names one.
voice_block needs provider and segment_video needs talking_head: each
family keeps its own default.
輸入參數modelaction必填providersettingsgeneration必填talking_head
Permanently delete; irreversible, so confirm with the user first.
project: it and everything in it. asset: a character, environment or
object. music_track: a background music track. segment_extra: a
segment's sound effect or overlay, with its scene layers. A segment's
image, clip and voiceover can't be deleted.
輸入參數idtype必填project_idsegment_number
projects_read
Read channels and projects
Your channels, or the projects in one channel.
輸入參數action必填channel_id
projects_edit
Edit channels and projects
Create a channel or a project, or change a project's title, brief or
video format. A new project takes its channel's style; a channel with no
style needs one (style_edit action=create) before anything is
generated. Share the returned web_url so the user can follow along.
輸入參數nametitleaction必填channel_idproject_iddescriptionvideo_format
style_read
Read the channel style
get: the channel style: its references, its fields (art_style,
narrative_style, director_style, text_style, any added; script_prompt on
request), the summary analysis wrote for each, and templates, the
character and environment template images (null: not rendered; a URL:
it exists, so view_image it rather than render it again).
inputs_stale: the references changed since the last analysis (offer
style_generate action=analyze). templates_stale: the art style or its
image references changed since the templates were rendered (offer to render them again).
presets: the preset catalog, one list per axis (art_style,
narrative_style, director_style), with labels, descriptions and, for art
presets, preview images. Let the user pick one per axis.
輸入參數action必填channel_idproject_idinclude_script_prompt
style_edit
Edit the channel style
Create or change the channel style (one per channel, used by all its
projects).
create: offer the user two real options, never invented ones. (a)
References (best): YouTube links of their channel or of videos whose
look they like, or a written description. Analysis starts at once and
writes the fields: wait with get_status channel_id wait=true, then
render both template images (style_generate action=template). A
reference informs every axis, narrative included; for its look only,
give it contributes_to ["art_style"]. (b) Presets: one per axis, all
three; instant, and the art preset brings its template images. Presets
and references don't mix.
update_fields: replace fields' text; it never starts an analysis (an
analysis rewrites art_style, narrative_style, director_style and
text_style). Those four and script_prompt can't be removed, every field
needs text, and summaries are written only by analysis. Real photos and
B-roll are turned on by the literal `@real-media` tag in director_style,
with prose on when and how much; remove it to turn them off.
update_references: replace the references, fields untouched
(inputs_stale turns true). File references can only be added in the
app.
輸入參數nameaction必填fieldspresetschannel_id必填references
style_generate
Generate for the channel style
analyze: read the references again and rewrite art_style,
narrative_style, director_style and text_style, replacing hand edits.
template: render one of the style's two template images. Reference
images render on them (characters on the character template,
environments and objects on the environment one) and segment images
fall back on them, so finish both before any reference image. An
existing one is refused unless replace=true: replacing it changes the
look of everything rendered after.
輸入參數modelaction必填replacesettingschannel_id必填template_typeeditable_sections
script_read
Read the script
The active script, its versions, and the script settings
(script_target_minutes, voice_mix, visual concept). Show the script to
the user before Analyze Script.
輸入參數project_id必填
script_edit
Edit the script
Change the script or its settings; only revise spends credits.
save: replace the active version's text (the old text is lost: show the
user the current script first), then run Analyze Script. Notation, never
read aloud: `[SCENE: <visual direction>]` as its own paragraph directs
the storyboard for the narration after it, until the next one, over the
director style. `<break time="1.5s" />` is the only thing that makes the
voice pause (about 0.5s between thoughts, 1.0s between sections; one tag
with the total, never two in a row). A paragraph starting `Name: "..."`
is that character's dialogue. A delivery cue in square brackets inside
a line (`[laughs]`, `[sighs]`, `[whispers]`) shapes how it is said; keep
it inline, never on its own line. MiniMax performs sounds such as
laughs, sighs, breathes, gasps and coughs and drops other cues.
activate_version: switch to another version (each generated script is
one). revise: an AI rewrite of a passage or the whole script in the
narrative voice; returns revised_text without saving it: splice it in
and save.
輸入參數action必填contentscript_idvoice_mixproject_id必填instructionselected_textvisual_conceptscript_target_minutes
script_generate
Generate the script or analyze it
generate: write the script from the brief and the narrative style;
each run is a new version (review it with script_read).
analyze (Analyze Script): find the script's characters, environments
and objects (including any named only in `[SCENE: ...]` directions) and
split it into voice blocks. Existing assets are kept as they are
(description, reference image, voice) and new ones added; assets the
script no longer names stay until the user deletes them. Review with
assets_read.
輸入參數modelaction必填settingsproject_id必填editable_sections
The project's characters, environments and objects, each with its
description (what every render follows), reference_image (null: not
rendered; view_image it) and, for characters, voice_id. Each needs a
reference image before the voiceover.
輸入參數asset_typeproject_id必填
Add a character, environment or object that Analyze Script missed,
or rename one or rewrite its description. After a description change,
render its reference image again (assets_generate asset_ids).
輸入參數nameaction必填asset_idasset_typeproject_iddescription
assets_generate
Generate reference images
Render reference images, which keep each character, environment and
object looking the same in every segment. Needs both style template
images. Without asset_ids it renders every asset with none, skipping
ones already rendering, so a repeat never bills twice. Afterwards,
view_image them to check likeness.
輸入參數modeldry_runsettingsasset_idsproject_id必填editable_sections
voiceover_read
Read voices and voice blocks
voices: one engine's voice ids, labels and preview audio, as
{groups, voices}. blocks: the voice blocks (narration and dialogue) with
their speaker, voice_id (the speaker's voice), audio and any
`[SCENE: ...]` direction over them (never spoken), as {blocks,
total_duration_ms, all_complete}.
輸入參數groupaction必填providerproject_idinclude_subtitle_data
voiceover_edit
Edit voices and voice blocks
Voices and voice blocks; free. set_voice: the narrator's or a
character's voice; every speaker needs one before the voiceover.
rescan_blocks: split the active script into voice blocks again after an
edit, assets untouched; blocks whose words are unchanged keep their
audio. settings: the voice engine, narrator speed and language.
輸入參數action必填speakerlanguagevoice_idproject_id必填narrator_speedvoice_tts_provider
voiceover_generate
Generate the voiceover
Generate voice block audio. Every speaker needs a voice first, and
every asset a reference image. Without voice_block_ids it fills every
block with no audio, skipping ones already generating. A model must
match the project's voice engine. An existing storyboard retimes to the
new audio on its own.
輸入參數modeldry_runsettingsproject_id必填voice_block_idseditable_sections
storyboard_read
Read the storyboard
segments: {total, offset, returned, segments}. Each segment has its
segment_number (the handle segment tools take), kind (image, clip,
talking head, real photo, B-roll or overlay segment), narration,
duration, direction, image_prompt, video_prompt (the motion when
animated), media_queries (searches for a real photo or B-roll), the
characters, environments and objects it shows, continues_from_segment
(its image continues that earlier segment's image) and its assets.
segment_assets: {segment_number, assets}: its image, clip, real photos,
overlays and sound effects, each with kind, status, prompt, model,
earlier_renders (what a rollback can restore) and public_url (for
view_image).
輸入參數limitaction必填offsetproject_id必填segment_number
storyboard_edit
Edit storyboard settings
Storyboard settings, used by the next storyboard run.
輸入參數action必填sfx_level必填project_id必填
storyboard_generate
Generate the storyboard
Plan the storyboard: every segment, its timing, image and motion
prompts, overlays and continuations, following the channel style and
any `[SCENE: ...]` directions. Needs the finished voiceover (its timing
drives the cuts). It plans images, plus real photos and B-roll when the
director style has the `@real-media` tag; clips come later, by animating
rendered images. Running it again replaces the whole plan, edits
included. The longest step (several minutes): get_status wait=true,
repeatedly.
輸入參數modelsettingsproject_id必填editable_sections
segment_edit
Edit a segment
Change one segment without losing renders; only split spends
credits. Returns the changed segments.
set_prompts: write prompts verbatim, no AI rewrite. The renders stay as
they are: render the segment again to apply the new prompts.
set_continuation: make this segment's image continue an earlier one's
(same composition, only the change); render the image again.
rollback: restore one of the last 5 renders of the image or clip; the
current one takes its place, so it can be undone, and the prompt
editor's model stays as it is. split: cut into 2-4 parts; the
inheriting part keeps the prompts and renders; the others start empty
and get prompts written from their narration in the background (spends
credits), or give them prompts with set_prompts. Later segments
renumber: read the storyboard again before more edits.
輸入參數whatindexaction必填offsets_msproject_id必填image_promptvideo_promptinherit_indexmedia_queriescontinues_fromsegment_number必填
segment_restructure
Restructure a segment
Change what a segment is. Every call previews first: when no
rendered image or clip would be lost it runs; otherwise it changes
nothing and returns what would be lost. Show the user, then call again
with confirm=true.
combine: merge with a neighboring segment. The kept segment's renders
stay, retimed to the combined length, but go stale: its prompts are
rewritten for the combined narration, so render it again after. The
other's are deleted (the preview names it).
change_type: to an image, real photo, B-roll (both fetched) or overlay
segment. Clips and talking heads come from render action=animate.
keep_image turns a clip back into its image, keeping the render. A
change between an image, real photo and B-roll keeps the prompts;
render the image again.
rewrite: an AI rewrite of the prompts from feedback; render the image
and clip again after. For exact text, use segment_edit set_prompts.
combine, rewrite and a change to or from an overlay segment write
prompts in the background, and a change to a real photo or B-roll with
no searches yet writes its searches (its prompts stay): a small AI step
that spends credits (get_status wait=true). Until it finishes,
change_type is refused (409). Sound effects and overlays always
survive; change an overlay's text with editor_edit scene_note. Later
segments may renumber: read the storyboard again.
輸入參數tokeepaction必填confirmfeedbackkeep_imageproject_id必填segment_number必填with_segment_number
Render segment images and clips, the biggest spend in the video:
always run it with dry_run=true first and get the user's yes on the
estimate.
generate: without segment_numbers, everything not yet rendered (items
rendering are skipped); with them, those segments, finished renders
included, e.g. the first minute before the whole video. Overrides need
segment_numbers and what=images or what=clips.
animate: turn one segment's rendered image into a clip; animate only
images worth motion. dry_run quotes the default clip or talking head
model. A refused render leaves the segment as it was; to go back to the
image, segment_restructure change_type to=image keep_image=true.
Check renders with storyboard_read action=segment_assets and
view_image.
輸入參數whatmodelaction必填dry_runsettingsproject_id必填talking_headsegment_numbersegment_numberseditable_sections
editor_read
Read the editor
scenes: the editor timeline, one scene per segment, as {total,
offset, returned, scenes}; scenes build on their own from the
storyboard. music: {tracks}, timed in seconds. audio_library: tracks to
add with editor_edit; when nothing matches, it lists the library's moods
and genres.
輸入參數moodgenrelimitaction必填offsetsearchcategoryproject_idinclude_composition
editor_edit
Edit the video
Polish the video in the editor; changes show in the next export.
scene_note: edit one scene with a note (move, restyle, add or remove
layers and overlays, change the text of a lower third, title card or
callout, change motion); spends credits. Returns the changes and
skipped_mutations: edits that didn't land (applied=false) or landed
differently than asked (applied=true), each with a reason; check them.
Scene lengths follow the narration; the image, clip and voiceover layers
can't be removed. project_note: a note for the whole video, applied to
up to 10 scenes per call; spends credits. captions: merge caption
settings. add_sfx: attach a sound effect to a segment. add_music /
update_music: background music timed in seconds; a track's duration
follows from its trim.
輸入參數loopnameaction必填volumemessagetrack_idproject_idstart_secondscaption_configsegment_numberlibrary_track_idtrim_end_seconds另有 1 個
export_video
Export the video
Render the finished video from the editor timeline; free. When the
export job completes, get_status carries export_url.
輸入參數project_id必填