Runs the AI script writer and stores the result on the video's brief as
brief.text. Charges one generation's worth of credits, so a workspace
with an empty balance is refused with warning-no-credits.
Pass prompt to restate what the script should be about; it is saved
as scriptPrompt and reused next time. Without it the video must
already carry a scriptPrompt or a prompt.
Synchronous: the call returns the finished script.
Authorization
bearerAuth An API key created under Settings > API & Webhooks. Keys start with sf_live_.
In: header
Path Parameters
Header Parameters
Unique key per action (a UUID works well). Reusing it replays the first response instead of running the action again, so a retry after a timeout can never generate, render, publish or charge twice.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/videos/string/script" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Three habits that quietly wreck a founder\'s week" }'{ "data": { "videoId": "7bQxL2mF9dR4tK1sv", "script": "Most founders do not burn out from working too much. They burn out from never finishing anything." }}Write the video's social caption POST
Runs the AI caption writer and stores the result as `brief.description`, which is what a publish posts alongside the video. Charges one generation's worth of credits. Pass `prompt` to steer the caption; it is saved as `descriptionPrompt` and reused next time. Synchronous.
Get a publishing profile GET
One profile and the social accounts connected to it. Pass `?refresh=true` to re-sync them first.