Generate script
generate_scriptPrepare workspace grounding for a video script or save an agent-written draft as a new version. Omit the script to retrieve context, then submit the structured draft to get a saved ID and version.
Instructions
Prepare workspace grounding for a video script, or save an agent-written script as a new version. Use for a new draft; use revise_script to revise an existing script or write_blog/write_tweet for prose pieces. Omit script to retrieve context, then submit your structured draft. The agent writes it; server-side BYO generation is not implemented. Returns grounding or the saved script ID and version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Compute provenance label: agent or byo_key. The caller still supplies the analysis; this field alone does not run a provider model. | |
| script | No | Agent-written object with hook, beats, body, cta and source_yoinks citations; optional shot_list. Omit to retrieve grounding only. | |
| workspace_id | Yes | Saved workspace identifier from list_workspaces or get_workspace. | |
| hook_type_lens | No | Optional hook lens that biases the script's opening toward that style (generation intent). | |
| parent_script_id | No | Prior script-version ID to link as this version's parent; omit for an initial draft. |