LongStories for AI apps

Connect ChatGPT, Claude, Codex, Cursor or another AI app to your LongStories account. Then ask it in your own words to make a video, change a Shot, or post a finished video. The app uses the same actions as the website, with your projects and your credits.

Server address
https://longstories.ai/api/mcp
Sign-in
Your LongStories account, in the browser. There is no API key.
Cost
The connection is free. Paid work uses your credits at the prices of the website. A new video needs a paid plan.
For AI agents and code generators:/resources/mcp.md/docs/longstories-mcp.json

Connect an app

Claude Code

  1. Run the command below in a terminal.
  2. Start claude, type /mcp, select longstories, then select Authenticate.
  3. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
Terminal
claude mcp add --transport http --scope user longstories https://longstories.ai/api/mcp

Claude (web, desktop and phone)

  1. Open Customize, then Connectors. Select Add, then Add custom connector.
  2. Enter the name LongStories and the address https://longstories.ai/api/mcp, then add the connector.
  3. Select Connect. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
Custom connectors in Claude

ChatGPT

  1. Open Plugins. Add LongStories from the list. If it is not in your list, select +, then Add custom MCP server.
  2. For a custom server, enter the name LongStories and the address https://longstories.ai/api/mcp, and select OAuth for the sign-in.
  3. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
  4. In a new chat, type @ and select LongStories. ChatGPT can also show the LongStories editor in the chat.
Custom MCP servers in ChatGPT

Codex

  1. Run the two commands below in a terminal.
  2. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
Terminal
codex mcp add longstories --url https://longstories.ai/api/mcp
codex mcp login longstories
MCP in Codex

Cursor

  1. Open Settings, then MCP, and add a server. Or put the lines below in the file mcp.json of Cursor.
  2. Start the sign-in when Cursor asks. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
mcp.json
{
  "mcpServers": {
    "longstories": {
      "url": "https://longstories.ai/api/mcp"
    }
  }
}
MCP in Cursor

Another AI app

  1. Find where the app adds a remote MCP server. Some apps call it a connector or an integration.
  2. Add a server with the address https://longstories.ai/api/mcp. If the app asks for a type, select HTTP (Streamable HTTP). Leave the client ID and the client secret empty.
  3. Start the sign-in. Your browser opens LongStories. Sign in, check the two spending limits, and select Connect.
  • The sign-in page shows the name that the app gives itself. LongStories cannot verify that name. Connect only an app that you started yourself.
  • A connection ends by itself after 30 days. Then the app asks you to sign in again. You see your connected apps, change their limits and disconnect them on your connected AI apps.

The steps for a person, with no code: Use LongStories from an AI app.

What to ask

Talk to the app as you talk to a person. For example:

  • “Show my LongStories videos.”
  • “Make a 30-second video about a fox that learns to fly. Tell me the price first.”
  • “In my fox video, make the second Shot brighter.”
  • “Change the voice of the narrator to a calm, older voice.”
  • “Is my fox video finished? Give me the link.”
  • “Post the finished video to my YouTube channel as unlisted.”

What you do on the website

  • Buy credits, or change or cancel your plan.
  • Connect a YouTube, Instagram, Facebook or TikTok account, and post to TikTok.
  • Change the spending limits of an app, or disconnect it.
  • Make and manage channels, and use the Ideas board.
  • Convert a video from before the Card editor to the Card editor.
  • See and edit the video in the visual editor. The app gives you the link of the editor of each video. ChatGPT can show the editor in the chat.

Spending and approval

  • When you connect an app, you set two limits: the credits for one action (150 at first) and the credits for one day of 24 hours (500 at first).
  • Inside both limits, the app starts paid work and tells you the cost.
  • Over a limit, the app tells you the action and its cost, and asks you for a yes or a no in the chat. Nothing starts before your answer. You never need to open the website to approve.
  • Set a limit to 0 to be asked before each spend.
  • Some actions ask you each time, at any cost: a post to a platform, the posting of a series, a move that lets a series make its planned episodes, and a delete that cannot be undone.
  • The app sends your answer to LongStories, and LongStories takes the app's word for it. The limits keep a well-behaved app inside your budget. They do not stop an app that answers for you. Connect only an app that you trust, and disconnect an app that spends without a question.

How an approval works

  1. The app calls a paid tool. Each paid tool takes the price that its quote tool gave, so a changed price is refused, not charged.
  2. Inside both limits of the user, the work starts.
  3. An app that shows an MCP form (form elicitation, MCP 2026-07-28) gets the form. The answer of the user in the form is the approval.
  4. Each other app gets the reply approval_required, with an approvalId, a summary of the action, its credits and a reason: no_limit, over_action_limit, over_day_limit, or always for an action that asks each time. No work started.
  5. The app tells the user the action and the cost, and asks for a yes or a no. Then it calls confirm_operation with the approvalId and the answer (yes or no). confirm_operation starts nothing.
  6. After a yes, the app calls the paid tool again with the same input and the same request ID. The work starts.
  7. An answer holds for 10 minutes, for the connection that asked, and for that exact input, price and state of the video. A change of one of them needs a new answer.

How work runs

  • A reply that says accepted means that the work started. It does not mean that the video, the picture or the export is finished. The reply names the tool that reads the state, such as observe_video_creation, observe_run, read_operation or observe_export.
  • Work goes on in LongStories after the chat ends. Come back later and ask for the state.
  • Each tool that starts work takes a request ID that the app makes (operationKey, requestId, idempotencyKey or attemptId). After a lost reply, the app sends the same ID again, or reads the work with it. A new ID is a new, second piece of paid work.
  • A change to a Card or a Shot takes the revision that the last read gave. If the video changed after that read, the tool refuses the change: read again, then change.
  • A finished video has a saved export. read_export says if the saved file has each edit (current) or is older than the last edit (behind). Export again after an edit.
  • A link to a picture, a clip or a file is signed and works for a short time. Give the user each link whole.

Refusals

  • A refusal has status: "rejected", a code and a message in plain words. Some refusals have details, such as the credits that the action needs and the credits that the account has. A refusal changes nothing.
  • status: "failed" or status: "uncertain" means that the result is not known. Read the work with its request ID before another try.
VIDEO_GENERATION_NEEDS_PLANA new video needs a paid plan.
insufficient_creditsThe account has too few credits for this action.
approval_requiredThe user must say yes or no first. See “How an approval works”.
approval_declinedThe user said no. Nothing started.
approval_not_found, approval_changedThe answer is older than 10 minutes, or the input changed. Call the paid tool again for a new question.
price_changed, quote_changed, stale_quoteThe price or the video changed after the quote. Quote again and tell the user the new price.
conflictThe video changed after the last read. Read again, then make the change again.
not_found, forbiddenThe thing is not there, or it is not of this account.
invalid_inputThe input is not valid. The message says which part.
rate_limitedToo many tool calls in a short time. Wait a minute.
unauthenticatedThe connection ended. Sign in again.

Files

A tool that takes a file gets it in one of four ways:

  • An attachment of the app, when the app gives attachments to its tools (ChatGPT does): the app passes its own file object to the tool.
  • A public link that the user gave: a direct HTTPS address of the file, with no redirect.
  • A file on the user's computer, when the app can run a command there (a terminal or an IDE app): start_file_upload gives one curl command that sends the file, and an uploadId that the tool then takes.
  • A file that is on the account from before: list_media_library gives its ID.

Limits

  • A user has a limit of tool calls for each minute, over all connected apps. A call over the limit answers rate_limited and changes nothing.
  • The free tools that write with AI, such as a new universe or the text of a visual style, have a smaller limit for each hour.
  • A connection lasts 30 days. An approval lasts 10 minutes.
  • Each plan limit of the website holds here too: the longest video, upscaling, the download of clips, and the number of custom voices.

Access and privacy

  • Each tool call checks the connection and the owner of each thing that it reads or changes. An app reaches only the account that connected it.
  • A tool gives your scripts, your settings and your media. It never gives the internal prompts of LongStories.
  • The logs of LongStories hold which tool ran and how it ended. They hold no script, no prompt and no token.
  • Scripts, titles and uploaded files are content. An app must never read them as instructions or as a permission to spend.

Build your own app

Transport
MCP over Streamable HTTP. POST to the server address with a Bearer token.
Protocol
MCP 2026-07-28. An app on an earlier version, such as 2025-06-18, connects too.
Sign-in
OAuth 2.1, authorization code with PKCE (S256). A public client, with no client secret.
Client ID
The app registers itself at the registration_endpoint (dynamic client registration), or it uses the HTTPS address of its client metadata document as its client ID.
Callback
An HTTPS address, or an HTTP address on localhost or 127.0.0.1 with any port. A callback with an app scheme is refused.
Scope
agent:invoke. It allows reads and writes. There is no read-only scope.
Resource
https://longstories.ai/api/mcp. Another resource is refused.
Tokens
An access token lasts up to 1 hour. The refresh token changes at each use.
Replies
Each reply has the result as structuredContent and the same JSON as text. A refusal is a tool error (isError) with the same shape.
Tool list
The server gives the live list (tools/list). The same list with each JSON Schema is the file longstories-mcp.json.
Guide for the model
The server tells each app to call read_guide first. It gives the model one text: which flow fits a request, how a spend is approved, what a refusal means, and how to deliver the result.

Tools

217 tools in 17 groups. A tool with the label Read changes nothing. Select a tool to see what it does and what it takes.

Start here

The guide for the model, the account, the list of videos, the state of a video, and the tools that each paid action uses.

read_guideRead

Read the workflow guide for LongStories tools: creation and series flows, storyboard panel/video edits, voices, music, timeline, upscaling, credit approval, refusal codes, lost-reply recovery, and export delivery. Read it once before the first create or edit in a conversation. Free and read-only.

read_accountRead

Read this account's plan and credit balance: the plan name, whether it is paid and renews, when it ends, the credits it includes each period, and whether it can make a new video now. Read it when the user asks about the plan or credits, or before a paid action when the balance may be too low. A null plan means the plan could not be read now; try again later.

list_projectsRead

List this account's saved projects. Use the returned project ID to read or edit a video. Page through all results when needed.

offset
whole number, 0 or more. Default: 0
limit
whole number, 1 to 50. Default: 20
inspect_projectRead

Inspect saved project state with separate Card, Shot, and editor-run pages. Read creation.runId with observe_video_creation to resume a Create run. Use read_project for the full script, read_card for details, and read_export to confirm the saved video includes current edits. This does not start or retry work.

projectIdrequired
UUID
cards
object. Default: {"offset":0,"limit":25}
shots
object. Default: {"offset":0,"limit":25}
runs
object. Default: {"offset":0,"limit":25}
open_editorRead

Open the Video editor inside ChatGPT. With no project ID, show this account's projects. With a project ID, open its saved Cards and Shots. The editor uses the same product actions as LongStories. Opening it does not generate or change anything.

projectId
UUID
cards
object. Default: {"offset":0,"limit":25}
shots
object. Default: {"offset":0,"limit":25}
runs
object. Default: {"offset":0,"limit":25}
view_picturesRead

Look at up to 4 pictures yourself, to compare takes or to check a look before you say something about a picture. Each item of pictureUrls is a picture link of a tool answer (pictureUrl, previewUrl, thumbnailUrl, or url of an image take), or a direct public HTTPS link of a PNG, JPEG, GIF or WebP image that the user gave. The answer holds a small copy of each picture (at most 768 pixels on its long side) as image content, in the order of the links. Put the pictures of one comparison in one call: one call of an account runs at a time. The copies go to you only: the user does not see them, so give the user the links too. If the answer shows no image to you, your app does not pass pictures on: do not describe a picture that you did not see. A link of a tool answer works for 1 hour; when it is refused, read its source again for a new link. Free and read-only.

pictureUrlsrequired
list of text, at most 4
confirm_operationWrite

Record the user's answer to a paid operation that returned approval_required. Call it only after you told the user the exact action and its credit cost from that reply, and the user answered yes or no in this conversation. Never answer for the user. After a yes, call the paid tool again with the same input and request ID. This starts nothing by itself.

approvalIdrequired
UUID
userSaidrequired
one ofyesno
read_operationRead

Read an accepted customer operation after a lost reply, including saved result IDs. Pending or uncertain work must not be submitted with a new request ID. Generation runs and exports also have their own observation tools.

requestIdrequired
UUID
observe_runRead

Read the saved status of an editor generation run. Queued or running work is not a reason to resubmit. Read the Card and takes after success.

projectIdrequired
UUID
runIdrequired
text

Make a new video

A complete video from an idea, a full script, a narration or a song: read the options, get the price, start, and follow the run.

read_creation_optionsRead

List this account's universes, visual styles and supported creation settings. Read these before creating a project.

selectionrequired
one of several shapes
read_script_formatRead

Read the public LongStories script syntax and a complete valid example. Use validate_script before quoting a full script for video creation.

validate_scriptRead

Validate customer script syntax without generation or model calls. Returns exact issues to fix. Creation still checks settings, plan and storage rules.

scriptrequired
text, at most 100000 characters
quote_video_creationRead

Review the price and settings for a complete LongStories video, using the same creation flow as the website. Start from an idea, a full LongStories script, or narration or song audio already uploaded to your account. Use audioId from list_media_library for narration or songs. This does not start video generation. Keep the same operationKey for the matching generation request.

operationKeyrequired
text, at most 128 characters
universeSlugrequired
text, at most 120 characters
projectPrompt
text
createProduct
one ofvideomusicvideo (a Video Story, the default) or music (a Music Video). LongStories offers no Explainer Video now.
durationrequired
textThe length of the video in seconds, as text. For an idea (inputMode prompt) it is one of 15, 30, 60, 180, 300, 600, 900: another value has no price, and the plan of the account sets the longest one. For a script or audio, the script or the audio sets the length: give one of these values.
inputMode
one ofpromptscriptaudio
animation
true or false
animationPreset
text
imagePreset
one ofbasicadvancedlegacy
selectedCharacterIds
list of text, at most 15
characterHandleAssignments
object
series
object
selectedLocationIds
list of UUID, at most 10
selectedObjectIds
list of UUID, at most 10
elementHandleAssignments
object
aiNewElementHandles
list of text, at most 80 characters, at most 40
selectedLanguageCode
text or null
visualStyleId
one of several shapes
preferAiStyle
true or false
removeWatermark
true or false
userAspectRatio
one of several shapes
userCaptionsEnabled
true or false or null
userLipsyncEnabled
true or false or null
userLipsyncTier
one of several shapes
videoModelOverride
text
imageModelOverride
one ofz_image_turboflux_schnellimagen4_fastsdxlhidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_edit
videoResolutionOverride
one of. Default: "480p"480p720p1080p4k
userScript
text
scriptFormat
always "ls_markdown_script"
audioKind
one ofvoiceoversong
songPerformance
object
userVoiceId
text
userVoiceoverEnabled
true or false
narrationIntent
one of several shapes
soundEffectsEnabled
true or false
soundEffectsModel
text
multiCutEnabled
true or false
keepAuthoredShotBoundaries
true or false
locationConsistencyEnabled
true or false
objectConsistencyEnabled
true or false
audioId
UUID
generate_videoWrite

Create and generate a complete video through the same LongStories creation flow as the website. Supports ideas, full scripts, and owned uploaded narration or songs. Use audioId from list_media_library for uploaded audio. Show the current credit price and get the user's approval before generation. Keep the same operationKey and input after a lost reply; a new key means a new paid video. Returns a project and generation run to observe and edit.

operationKeyrequired
text, at most 128 characters
universeSlugrequired
text, at most 120 characters
projectPrompt
text
createProduct
one ofvideomusicvideo (a Video Story, the default) or music (a Music Video). LongStories offers no Explainer Video now.
durationrequired
textThe length of the video in seconds, as text. For an idea (inputMode prompt) it is one of 15, 30, 60, 180, 300, 600, 900: another value has no price, and the plan of the account sets the longest one. For a script or audio, the script or the audio sets the length: give one of these values.
inputMode
one ofpromptscriptaudio
animation
true or false
animationPreset
text
imagePreset
one ofbasicadvancedlegacy
selectedCharacterIds
list of text, at most 15
characterHandleAssignments
object
series
object
selectedLocationIds
list of UUID, at most 10
selectedObjectIds
list of UUID, at most 10
elementHandleAssignments
object
aiNewElementHandles
list of text, at most 80 characters, at most 40
selectedLanguageCode
text or null
visualStyleId
one of several shapes
preferAiStyle
true or false
removeWatermark
true or false
userAspectRatio
one of several shapes
userCaptionsEnabled
true or false or null
userLipsyncEnabled
true or false or null
userLipsyncTier
one of several shapes
videoModelOverride
text
imageModelOverride
one ofz_image_turboflux_schnellimagen4_fastsdxlhidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_edit
videoResolutionOverride
one of. Default: "480p"480p720p1080p4k
userScript
text
scriptFormat
always "ls_markdown_script"
audioKind
one ofvoiceoversong
songPerformance
object
userVoiceId
text
userVoiceoverEnabled
true or false
narrationIntent
one of several shapes
soundEffectsEnabled
true or false
soundEffectsModel
text
multiCutEnabled
true or false
keepAuthoredShotBoundaries
true or false
locationConsistencyEnabled
true or false
objectConsistencyEnabled
true or false
audioId
UUID
observe_video_creationRead

Read the saved state and completed output of a full video generation in your account. Use the projectId and runId returned by generate_video. Generation continues on LongStories while you are away. An accepted request does not mean the video is complete.

projectIdrequired
UUID
runIdrequired
text, at most 200 characters
undo_video_creationWrite

Stop a new video in its first 2 minutes, as Stop on the website does: the generation stops, all its credits go back, and the video leaves My Videos. Call it only when the user asked to stop this exact video. After 2 minutes it is refused.

projectIdrequired
UUID

Build a video part by part

A new project, its Cards and its Shots, written and made one at a time, for a user who wants to check each part.

create_projectWrite

Create an empty editable video project. Saves settings and its first scene without generating media. Keep requestId after a lost reply.

requestIdrequired
UUID
titlerequired
text, at most 120 characters
brief
text, at most 2000 characters. Default: ""
universeSlug
text, at most 120 characters. Default: "open-universe"
aspectRatiorequired
one of9:1616:9
animationPreset
one of. Default: "fast"minifastprosuper_proultrastaticcustom_model
resolution
one of. Default: "480p"480p720p1080p4k
visualStyleId
one of several shapes. Default: null
create_cardWrite

Save a Card with a complete customer script in a project scene. Use visual action and @Narrator: "spoken words". No media generation. Keep idempotencyKey and content after a lost reply.

projectIdrequired
text
sceneIdrequired
text
titlerequired
text
cardScriptrequired
text
afterCardId
text
idempotencyKeyrequired
UUID
lengthHintSeconds
number
add_blank_cardWrite

Add a blank Card at the chosen position using the same editor action. Keep requestId after a lost reply. Use the stored script version from read_project when required.

projectIdrequired
UUID
requestIdrequired
UUID
sceneId
one of several shapes
afterCardId
one of several shapes
expectedScriptVersion
whole number
quote_card_coverageRead

Read the fixed price for a Card storyboard or animated coverage. Returns the saved Card revision and the Shots that would be replaced. Does not plan, generate, or spend credits.

projectIdrequired
UUID
cardIdrequired
UUID
tierrequired
one ofminifastprosuper_proultra
doorrequired
one ofanimatedstoryboard
requestedSecondsrequired
number, 1 to 120
generate_card_coverageWrite

Generate the reviewed Card coverage after customer confirmation. Replaces that Card's current Shots. Copy the exact quote fields from quote_card_coverage. Keep requestId after a lost reply; a completed request returns its original receipt.

projectIdrequired
UUID
cardIdrequired
UUID
tierrequired
one ofminifastprosuper_proultra
doorrequired
one ofanimatedstoryboard
requestedSecondsrequired
number, 1 to 120
requestIdrequired
UUID
cardRevisionrequired
text
pricingResolutionrequired
one of480p720p1080p4k
pricingReviewrequired
object
creditsrequired
number
quote_coverage_animationRead

Read the video price for existing Shots, including any split needed by the chosen tier. Returns exact per-Shot prices and revisions. Does not generate or spend credits.

projectIdrequired
UUID
shotIdsrequired
list of UUID, at most 100
generationOptions
object
animate_coverageWrite

Animate reviewed existing Shots after customer confirmation. Some tiers split long dialogue into shorter Shots. Copy acceptedQuotes from quote_coverage_animation. Keep requestId after a lost reply; a completed request returns the original partial or complete receipt.

projectIdrequired
UUID
shotIdsrequired
list of UUID, at most 100
generationOptions
object
requestIdrequired
UUID
acceptedQuotesrequired
object
draft_shotWrite

Save a complete manual Shot draft, script, opening frame, motion and references in a Card. This does not generate media. Action Shots require 4–15 seconds and prepared character/location references; object references and character speech are not supported for Action Shots. Read the current Card revision first.

projectIdrequired
UUID
cardIdrequired
UUID
idempotencyKeyrequired
text
templaterequired
one offreeformlinedialoguesettingreactionactioncontinuous_shot
firstFrameDescriptionrequired
text, at most 10000 characters
motionDescriptionrequired
text, at most 10000 characters
referencesrequired
list of object, at most 8
shotScriptrequired
text, at most 10000 characters
expectedCardUpdatedAtrequired
text
localStartMsrequired
whole number, 0 or more
durationMsrequired
whole number, 500 or more
animationTier
one of several shapes. Default: null
pushFollowingShots
true or false. Default: false
review_shotRead

Read an ungenerated manual Shot draft and its current credit quote. Use its original idempotencyKey.

projectIdrequired
UUID
shotIdrequired
UUID
idempotencyKeyrequired
text
revise_shotWrite

Revise an ungenerated manual Shot's script, opening frame, motion and references together. Pass the current Shot revision. Timing and template remain as drafted. Accepted media attempts cannot be changed with this tool.

projectIdrequired
UUID
shotIdrequired
UUID
idempotencyKeyrequired
text
expectedShotUpdatedAtrequired
text
shotScriptrequired
text, at most 10000 characters
firstFrameDescriptionrequired
text, at most 10000 characters
motionDescriptionrequired
text, at most 10000 characters
referencesrequired
list of object, at most 8
generate_shotWrite

Generate a reviewed manual Shot. Uses native user confirmation of the exact current price and revision. Keep the original draft idempotencyKey. A repeat observes the same paid attempt; it cannot purchase a retry.

projectIdrequired
UUID
cardIdrequired
UUID
idempotencyKeyrequired
text
shotIdrequired
UUID
reviewRevisionrequired
object
quotedCreditsrequired
number, 0 or more
read_shot_generationRead

Read the accepted action for the exact original generate_shot input after a lost reply. This never starts, retries, or charges generation. A not_found result can still mean the original request is pending. Keep its draft key and review.

projectIdrequired
UUID
cardIdrequired
UUID
idempotencyKeyrequired
text
shotIdrequired
UUID
reviewRevisionrequired
object
quotedCreditsrequired
number, 0 or more

Read a video

The full script, one Card, one Shot, its takes, and the archived parts.

read_projectRead

Read the full stored script and current Card-derived script, scenes, Cards, Shots and customer settings. Use current revisions before edits. Internal generation instructions are never returned.

projectIdrequired
UUID
read_cardRead

Read one Card's full script, Shot scripts, timing, speech, media and editing revisions.

projectIdrequired
UUID
cardIdrequired
UUID
read_shotRead

Read a Shot's current revision and recover its original manual draft operation key and price review. Use this to continue a saved draft in a new chat.

projectIdrequired
UUID
shotIdrequired
UUID
read_shot_previewRead

Read only the selected completed image and video for an owned Shot. Does not return take history or private generation instructions.

projectIdrequired
UUID
shotIdrequired
UUID
read_shot_takesRead

List saved image or video takes for a Shot, with safe preview links and selection status.

projectIdrequired
UUID
shotIdrequired
UUID
mediaTyperequired
one ofimagevideo
read_archiveRead

Read archived Cards and Shot timeline items with the identities and revisions needed to restore them.

projectIdrequired
UUID

Change the picture or the clip of a Shot

A new picture, a new clip, a change to some panels or some moments, the take in use, your own picture, and the sound of a Shot.

quote_shot_imageRead

Read the current price and effective model for a Shot image edit, angle change, or guidance regeneration. Guidance requires mode=guidance. This creates no media.

projectIdrequired
UUID
shotIdrequired
UUID
model
one ofz_image_turboflux_schnellimagen4_fastsdxlsdxl_lorahidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_loraflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_editLeave it out: LongStories takes the model of the change. An edit (mode edit) takes only gpt_image_25_flare_low_edit (Standard, the default) or gpt_image_25_sunburst_high_edit (Advanced, a higher price): another model is refused. Give the quote and the request the same model.
mode
one ofeditangleguidance
instructions
text
referenceImageAssetIds
list of UUID, at most 24
selectedCharacterIds
list of text
selectedLocationHandle
text
edit_shot_imageWrite

Edit or reframe a Shot image using customer instructions and project references. A completed take replaces its active image selection; previous takes remain available. Requires native approval at the quoted image price. Keep requestId after a lost reply; a new take needs a new ID and approval. Animate the resulting image with a separate video request.

projectIdrequired
UUID
shotIdrequired
UUID
instructionsrequired
text
model
one ofz_image_turboflux_schnellimagen4_fastsdxlsdxl_lorahidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_loraflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_editLeave it out: LongStories takes the model of the change. An edit (mode edit) takes only gpt_image_25_flare_low_edit (Standard, the default) or gpt_image_25_sunburst_high_edit (Advanced, a higher price): another model is refused. Give the quote and the request the same model.
mode
one ofeditangleguidance
referenceImageAssetIds
list of UUID, at most 24
selectedCharacterIds
list of text
selectedLocationHandle
text
acceptedImageCreditsrequired
number, 0 or more
cameraAngle
object
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
regenerate_shot_imageWrite

Generate a new Shot image from the customer's visual description and optional project location. A completed take replaces its active image selection; previous takes remain available. Quote mode=guidance first. Requires native approval. Keep requestId after a lost reply. A deliberate new take needs a new ID and approval.

projectIdrequired
UUID
shotIdrequired
UUID
visualDescriptionrequired
text
model
one ofz_image_turboflux_schnellimagen4_fastsdxlsdxl_lorahidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_loraflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_editLeave it out: LongStories takes its model for a new picture.
locationHandle
text or null
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
acceptedImageCreditsrequired
number, 0 or more
quote_shot_videoRead

Read the current video price for one Shot, including its model, duration, and lip-sync choice, with the editor's re-film options and the user's picks over them. Returns generationOptions: pass them unchanged to regenerate_shot_video. This does not generate video or modify settings.

projectIdrequired
UUID
shotIdrequired
UUID
keepMotion
true or false
generationOptions
object
lineSync
one of several shapes
regenerate_shot_videoWrite

Animate the Shot's selected image or make a new video take, with optional motion and lip-sync edits. Pass the generationOptions, quote and funding of quote_shot_video unchanged. A completed take can replace the selected clip in the saved Card; previous takes remain available. Requires native confirmation of the current quote. When the answer is 'replan', nothing was charged: the new motion does not fit the storyboard Shot's drawn panels with the lines over it now (a line moved after the storyboard was drawn), so it needs a new storyboard. Tell the person, then call plan_and_film_shot_again with replan.imageCredits, the video quote and the same motionDescription. Keep requestId after a lost reply; a deliberate new take needs a new ID and approval. Read the saved run and takes for progress.

projectIdrequired
UUID
shotIdrequired
UUID
acceptedQuoterequired
object
motionDescription
text
keepMotion
true or false
generationOptionsrequired
object
lineSync
one of several shapes
acceptedFundingrequired
object
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
read_media_requestRead

Read the accepted run for an exact earlier image or video request after a lost reply. Supply the same request ID and complete original input. This never starts or retries work. A not_found result only means an accepted run is not visible yet; it does not prove that no work started.

projectIdrequired
UUID
requestrequired
one of several shapes
quote_shot_panel_editWrite

Price an edit of some panels of one Shot's storyboard (one image with several panels), as the editor's Edit image does on a storyboard. Say in plain words what to change. LongStories finds the panels that the words name; only those are drawn again. Pass characterIds and locationHandle from read_elements, or name @handles in the instructions, for the reference pictures that the edit must use; each one adds to the price. The answer is 'quoted' (the panels in quote.cells, quote.reason, and quotedCredits: 0 when the project's free editing credits pay), or 'whole' when the words are about the whole sheet (then use quote_shot_image and edit_shot_image with the returned instruction), or a refusal that says what to do. Pass quote and quoteSeal unchanged to edit_shot_panels. This draws nothing and charges nothing.

projectIdrequired
UUID
shotIdrequired
UUID
instructionsrequired
text, at most 2000 characters
characterIds
list of UUID, at most 8
locationHandle
text, at most 80 characters
edit_shot_panelsWrite

Draw again only the panels that a quote of quote_shot_panel_edit names. The result is a new image take of the Shot; the earlier takes stay. The video keeps the old storyboard until the Shot is filmed again with regenerate_shot_video. Requires the person's approval of the price. LongStories refuses the quote when the storyboard or the free editing credits changed after it: price the edit again then. Keep requestId after a lost reply and read the saved answer with read_operation; a new ID is a new edit and a new approval.

projectIdrequired
UUID
shotIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quoterequired
objectThe quote of quote_shot_panel_edit, unchanged.
quoteSealrequired
text, at most 100 charactersThe quoteSeal that came with the quote, unchanged.
instructionsrequired
text, at most 2000 charactersThe words you gave quote_shot_panel_edit, unchanged.
quote_shot_video_editWrite

Price the editor's Edit video on one Shot that was filmed from a storyboard: an exact change in a part of the clip (a wrong gesture, a wrong prop, a mouth that does not move). Say in plain words what to change. LongStories finds the moments of the clip that the words name; only those are filmed again. The answer is 'quoted' (quote.moments, each with its seconds and price, and quote.credits, the price before the project's free editing credits), or 'whole' when the words are about the whole clip (then use quote_shot_video and regenerate_shot_video), or 'replan' when the lines over the Shot changed after it was filmed (then use plan_and_film_shot_again with replan.imageCredits), or a refusal that says what to do. When carriedLine is not null, a line of a filmed moment also plays in parts that stay, where the mouth would move with no sound: tell the person, and use carriedLine.quote with carriedLine.quoteSeal to film those parts too. Pass the chosen quote and its quoteSeal unchanged to edit_shot_video. This films nothing and charges nothing.

projectIdrequired
UUID
shotIdrequired
UUID
instructionsrequired
text, at most 2000 characters
pausedSeconds
number, 0 or moreA time in the clip, in seconds, for words such as 'here' or 'at this moment'.
edit_shot_videoWrite

Film again only the moments that a quote of quote_shot_video_edit names. The result is a new video take of the Shot; the earlier takes stay. Requires the person's approval of quote.credits; the project's free editing credits can only lower the charge. LongStories refuses the quote when the clip, the moments or the price changed after it: price the edit again then. Keep requestId after a lost reply and read the saved answer with read_operation; a new ID is a new edit and a new approval.

projectIdrequired
UUID
shotIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quoterequired
objectThe quote of quote_shot_video_edit, unchanged.
quoteSealrequired
text, at most 100 charactersThe quoteSeal that came with the quote, unchanged.
instructionsrequired
text, at most 2000 charactersThe words you gave quote_shot_video_edit, unchanged.
plan_and_film_shot_againWrite

Plan one storyboard Shot again from the lines over it now, draw its storyboard again and film it again, as the editor's Plan and film again does. Use it only when quote_shot_video_edit or regenerate_shot_video answers 'replan' (replan.imageCredits). It has two prices: the new storyboard (replan.imageCredits) and the new video (quote_shot_video, with the same lineSync). Requires the person's approval of their sum; the project's free editing credits can only lower the charge. LongStories refuses when one of the two prices changed, before a charge: price both again then. Keep requestId after a lost reply and read the saved answer with read_operation; a new ID is a new edit and a new approval.

projectIdrequired
UUID
shotIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
acceptedImageCreditsrequired
whole number, 0 or morereplan.imageCredits of quote_shot_video_edit or regenerate_shot_video.
acceptedVideoQuoterequired
objectThe quote of quote_shot_video, unchanged.
generationOptions
objectThe generationOptions of quote_shot_video, unchanged.
lineSync
one of several shapes
motionDescription
textAfter regenerate_shot_video answered 'replan': its motionDescription, unchanged. The new plan follows these words.
edit_shot_scriptWrite

Edit a current Short Shot before it has keyframe or segment records. Generated Shot scripts are read-only. For a manual draft use revise_shot. Keep requestId after a lost response.

projectIdrequired
UUID
shotIdrequired
text
shotScriptrequired
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
select_shot_takeWrite

Select an existing image or video take for a Shot. No media generation. The shared editor checks the take belongs to this Shot and is ready.

projectIdrequired
UUID
shotIdrequired
UUID
mediaTyperequired
one ofimagevideo
assetIdrequired
UUID
archive_shot_takeWrite

Archive a saved image or video take of a Shot, or bring an archived take back (archived false). No media generation. The take in use cannot be archived: select another take first. An archived take stays saved.

projectIdrequired
UUID
assetIdrequired
UUID
archivedrequired
true or false
upload_shot_imageWrite

Upload an image (file or uploadId) and select it for an owned Shot. The normal image moderation and file limits apply. This does not generate a new image. Keep requestId after a lost reply.

projectIdrequired
UUID
shotIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
import_shot_imageWrite

Apply an existing completed image from your account to a Shot. sceneId is the Shot ID used by the image picker. sourceAssetId must be an owned media asset; URLs and storage keys are not accepted.

sceneIdrequired
UUID
sourceAssetIdrequired
UUID
upload_shot_reference_pictureWrite

Upload an image (file or uploadId) as an extra reference picture for a Shot that is filmed from a storyboard and has the customer's own picture. The normal image moderation and file limits apply. The picture is saved and not yet used: list its assetId in set_shot_picture_use. Keep requestId after a lost reply.

projectIdrequired
UUID
shotIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
set_shot_picture_useWrite

Set how the video of a Shot that is filmed from a storyboard uses the customer's own picture (an uploaded or imported image that is the Shot's picture). first_frame starts the clip on that picture. reference keeps the storyboard and makes the clip look like the picture, with up to 3 extra reference pictures from upload_shot_reference_picture; leave extraReferenceAssetIds out to keep the saved ones. No media generation: the next video of the Shot uses the choice.

projectIdrequired
UUID
shotIdrequired
UUID
userequired
one offirst_framereference
extraReferenceAssetIds
list of UUID, at most 3
generate_shot_soundWrite

Generate or remove a Shot's overlay sound effects through the existing editor action. This action currently charges zero customer credits. Native confirmation is required. Keep requestId after a lost response.

projectIdrequired
UUID
shotIdrequired
text
generationOptions
object
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
restore_shot_soundWrite

Restore the Shot's previous saved sound effects. Does not generate audio. Keep requestId after a lost response.

projectIdrequired
UUID
shotIdrequired
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.

Cards and the timeline

The order and the shape of the video: Cards, Shots, captions, and the exact timing of each item. Free.

rename_cardWrite

Rename a Card at its current revision.

projectIdrequired
UUID
cardIdrequired
UUID
expectedCardUpdatedAtrequired
text
titlerequired
text, at most 500 characters
reorder_cardWrite

Move a Card to a one-based position, optionally in another project Scene. Keep requestId after a lost response and read changed Card revisions.

projectIdrequired
UUID
cardIdrequired
text
toIndexrequired
whole number
toSceneId
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
split_cardWrite

Split a Card at a millisecond position inside it. Keep requestId after a lost response; do not repeat under a new ID without reading the deck.

projectIdrequired
UUID
cardIdrequired
text
atMsrequired
number, 0 or more
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
merge_cardsWrite

Merge a Card with the specified next Card using the editor's media and timeline rules. Keep requestId after a lost response.

projectIdrequired
UUID
cardIdrequired
text
withNextCardIdrequired
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
move_shotsWrite

Move Shot timeline items from one Card to another Card, at a lane position of that Card, with the observed revisions of both Cards. The Shots keep their image, video and sound. No media generation. Keep requestId after a lost response.

projectIdrequired
UUID
cardIdrequired
text
timelineItemIdsrequired
list of text, at most 50
toCardIdrequired
text
toLaneIndexrequired
whole number, 0 or more
expectedCardUpdatedAt
text
expectedToCardUpdatedAt
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
archive_cardWrite

Archive a Card from the saved video. Supply the observed active Card order and revisions. The Card can be restored.

projectIdrequired
UUID
cardIdrequired
UUID
expectedCardUpdatedAtrequired
text
expectedActiveCardsrequired
list of object
restore_cardWrite

Restore an archived Card. Supply the current active Card order and revisions.

projectIdrequired
UUID
cardIdrequired
UUID
expectedCardUpdatedAtrequired
text
expectedActiveCardsrequired
list of object
archive_shotWrite

Archive a Shot timeline item from a Card, with the requested ripple behavior and observed Card revision. Keep requestId after a lost response.

projectIdrequired
UUID
cardIdrequired
text
timelineItemIdrequired
text
expectedCardUpdatedAt
text
ripple
true or false
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
restore_shotWrite

Restore an archived Shot timeline item through the editor's Card rules. Keep requestId after a lost response.

projectIdrequired
UUID
cardIdrequired
text
timelineItemIdrequired
text
expectedCardUpdatedAt
text
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
set_card_durationWrite

Set the saved duration of one Card in milliseconds, subject to its content and speech limits. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
set_card_captionsWrite

Set captions for one Card timeline item. Pass enabled, text, or both, and its current Card revision.

projectIdrequired
UUID
cardIdrequired
UUID
expectedCardUpdatedAtrequired
text
itemIdrequired
text
enabled
true or false
text
one of several shapes
resize_timeline_itemWrite

Resize one Card timeline item in milliseconds. Speech timing is protected and later items ripple with the change. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
trim_shot_sourceWrite

Trim a visual item's selected video to a source start and end in milliseconds. The saved video selection stays the same; later timeline items ripple with the trim. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
move_timeline_itemWrite

Move one Card timeline item to a local start time in milliseconds. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
reorder_shot_visualWrite

Move a Shot visual to a new one-based visual order within its Card. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
reorder_shot_lane_itemWrite

Move a Shot-lane item to a new zero-based lane position within its Card. The lane includes visuals and holds. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
insert_timeline_holdWrite

Insert a hold of a positive duration in milliseconds at a zero-based Shot-lane position, or at its end. This repacks the lane and changes the timing of later items. Keep the same holdId when retrying. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
remove_timeline_itemWrite

Remove one item from a Card timeline and ripple later items. This changes the saved video. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object

Voices and spoken lines

One spoken line, the voice of a character in the whole video, the narrator, and the link of a line to a Shot.

quote_add_voice_lineRead

Quote a new spoken line for one Card. Returns its exact change, credit price and Card revision without generating speech or charging credits. Pass that quote unchanged to add_voice_line.

projectIdrequired
UUID
changerequired
object
add_voice_lineWrite

Generate and add one new spoken line from quote_add_voice_line after confirmation of its exact text, credit price and revision. Keep requestId and the exact input after a lost response; pending or uncertain work must not be started with a new ID.

projectIdrequired
UUID
changerequired
object
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quoteRevisionrequired
text
quotedCreditsrequired
number, 0 or more
quote_edit_voice_lineRead

Quote a replacement for one existing spoken line in a Card. Returns its exact change, credit price and Card revision without generating speech or charging credits. Pass that quote unchanged to edit_voice_line.

projectIdrequired
UUID
changerequired
object
edit_voice_lineWrite

Generate replacement speech for one existing line from quote_edit_voice_line after confirmation of its exact text, credit price and revision. Replaces saved speech, without rewriting the generated Shot script or making lip-sync media. Keep requestId and the exact input after a lost response.

projectIdrequired
UUID
changerequired
object
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quoteRevisionrequired
text
quotedCreditsrequired
number, 0 or more
read_line_takesRead

List the saved takes of the spoken lines of one Card: each earlier speech of a line, with its words, voice and length, and the take in use marked. Pass timelineItemId for one line, or leave it out for each line of the Card. Use it before select_line_take.

projectIdrequired
UUID
cardIdrequired
UUID
timelineItemId
text
select_line_takeWrite

Put an earlier saved take of a spoken line back in use. takeId is a take from read_line_takes with selectable true. The line gets the take's words, voice and length, and the lines after it move as they do after a new speech. No speech generation and no credits. If the line is linked to lip sync, explicitly confirm the break.

projectIdrequired
text
cardIdrequired
text
timelineItemIdrequired
text
takeIdrequired
UUID
confirmLipsyncBreak
true or false
remove_voice_lineWrite

Remove an individual voice line. If it is linked to lip sync, explicitly confirm the break. Keep requestId after a lost response.

projectIdrequired
UUID
cardIdrequired
text
timelineItemIdrequired
text
confirmLipsyncBreak
true or false
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
trim_voiceover_silenceWrite

Trim the saved silence around a voiceover item using its recorded speech timing. Does not regenerate audio.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
itemIdrequired
text
remove_shot_lipsyncWrite

Remove the saved lip-sync selection from one visual item in a Card. Does not generate new media. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
read_voice_choicesRead

Find selectable voices by name, language, accent, or description. Returns preview links and at most 24 voices per page.

query
text, at most 100 characters. Default: ""
page
whole number, 1 to 1000000. Default: 1
inspect_and_resume_character_voicesWrite

Find the video's speakers and their IDs for quote_character_voice, including before the first voice change. Return current change status and lines that need a timing decision. This also resumes accepted work and can publish a ready voice replacement or end an expired review.

projectIdrequired
UUID
quote_character_voiceRead

Quote the credits and current video revision for replacing one speaker's generated voice across the video.

projectIdrequired
UUID
speakerIdrequired
text
targetVoiceIdrequired
text, at most 100 characters
change_character_voiceWrite

Replace one speaker's generated voice using an accepted quote. Requires customer confirmation. Keep the same request ID after a lost reply; inspect_and_resume_character_voices gives progress.

projectIdrequired
UUID
speakerIdrequired
text
targetVoiceIdrequired
text, at most 100 characters
requestIdrequired
UUID
revisionrequired
text, at most 64 characters
quotedCreditsrequired
whole number
accept_character_voice_lineWrite

Accept or undo extra time for a replacement voice line. Read the timing changes in inspect_and_resume_character_voices first. The final accepted line can publish the replacement voices.

projectIdrequired
UUID
changeIdrequired
UUID
itemIdrequired
text
acceptedrequired
true or false
quote_character_voice_retryRead

Quote a new generation of a replacement voice line with revised text. Use this when the replacement line does not fit.

projectIdrequired
UUID
changeIdrequired
UUID
itemIdrequired
text
textrequired
text, at most 2000 characters
retry_character_voice_lineWrite

Generate a replacement voice line again with revised text and an accepted credit quote. Requires customer confirmation. Keep the same request ID after a lost reply.

projectIdrequired
UUID
changeIdrequired
UUID
itemIdrequired
text
textrequired
text, at most 2000 characters
requestIdrequired
UUID
quotedCreditsrequired
whole number
cancel_character_voice_changeWrite

Cancel a pending voice replacement. This does not undo work already accepted by the generation service.

projectIdrequired
UUID
changeIdrequired
UUID
quote_narrator_voiceRead

Price a change of the narrator's voice, for a finished video that has one voiceover and no Cards. The change makes the whole voiceover again in the voice of targetVoiceId (from read_voice_choices) and renders the video again. For the voice of one speaker of a video with Cards, use quote_character_voice. Returns credits (pass it to change_narrator_voice as quotedCredits) and the length of the voiceover in seconds, or a refusal that says why the video cannot change its narrator. This changes nothing and does not read the balance.

projectIdrequired
UUID
targetVoiceIdrequired
text, at most 200 characters
change_narrator_voiceWrite

Make the whole voiceover of a video again in another voice and render the video again, at the price of quote_narrator_voice. Requires the person's approval of that price. The old voiceover plays until the new one is ready. Read read_narrator_voice_change for the state of the change after this tool answers 'queued'. Keep requestId after a lost reply: the same request gives its saved answer and starts no second change; read_operation reads it too. LongStories refuses a second change while one runs (voice_change_in_progress) and a change to the voice that the video has (same_voice). Undo does not reverse a voice change.

projectIdrequired
UUID
targetVoiceIdrequired
text, at most 200 characters
quotedCreditsrequired
numbercredits of quote_narrator_voice, unchanged.
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
read_narrator_voice_changeRead

Read the state of the narrator voice change of a video. state is 'running' (the voiceover is made again or the video is rendered), 'failed' (the last change failed, and the video has its voice of before: get a new quote to try again) or 'none' (no change runs and the last one did not fail). narratorVoiceId is the voice in the video's data: with 'none' it is the voice of the video; with 'running' it is already the new voice. This changes nothing.

projectIdrequired
UUID
set_character_voiceWrite

Set a saved character's voice for future generation. Set voiceId to null for Auto. Existing generated speech is unchanged; use change_character_voice to replace it.

characterIdrequired
UUID
voiceIdrequired
one of several shapes
add_custom_voiceWrite

Add a voice of the ElevenLabs Voice Library to the user's account from its share link, as Add voice of the voice picker does. The user gives the link (elevenlabs.io); never make one up. The plan sets how many custom voices an account can add (customVoiceLimit and customVoiceCount in the answer), and a voice with an extra usage fee is refused. A voice that the account or the catalog has already is given back with alreadyExists true. Returns the voice with its id for set_character_voice and the voice changes. Free.

shareLinkrequired
text, at most 2048 characters

Music, songs and the sound mix

The background music of a video, the loudness of each part, your own music tracks, and new songs.

read_project_musicRead

Read the background music of a video: its saved songs (musicClips), and the tracks that a song can play (tracks: the account's songs and uploads, and the LongStories catalog, each with its musicSlug and its length). musicClips is null when no song is saved: the video then plays the default music of its universe. A music video has no background music. This changes nothing.

projectIdrequired
UUID
set_project_musicWrite

Save the background music of a video: the whole list of its songs, which replaces the saved list. Read read_project_music first, keep each song that must stay as it is, and give a new song an id of your own. Each song starts in a Card (cardId, with startOffsetSeconds into it) and plays one part of its track (musicSlug, trimStartSeconds) until its end point (endCardId, endOffsetSeconds), the next song or the end of the video. An empty list removes all songs. Saved songs replace the default music of the universe. This is free and makes no media; the person can undo it in History. The saved video has the new music after the next export.

projectIdrequired
UUID
musicClipsrequired
list of object, at most 50
set_card_clip_audioWrite

Choose the original clip audio or the project's dubbed voice for one visual item.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
visualItemIdrequired
text
clipAudiorequired
one ofduboriginal
set_cards_audio_mixWrite

Change SFX mix, voiceover mute or clip audio across selected Cards. Supply each Card revision. Read all Cards after a partial or uncertain result.

projectIdrequired
text
cardsrequired
list of object
changerequired
one of several shapes
set_project_clip_audioWrite

Set the project's clip audio default and update selected Cards. Pass project and Card revisions. Read the project after a partial result.

projectIdrequired
text
expectedProjectUpdatedAtrequired
text
cardsrequired
list of object
clipAudiorequired
one ofduboriginal
set_timeline_item_audioWrite

Set mute state, volume from zero to one, or both for one audio-bearing Card timeline item. A visual clip supports volume changes; use set_card_clip_audio to select its audio source. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
set_shot_sfx_mixWrite

Set mute state, volume from zero to one, or both for a visual item's sound-effects mix within a Card. Supply the exact current Card revision. Read the Card again after a conflict or an uncertain result.

projectIdrequired
text
cardIdrequired
text
expectedCardUpdatedAtrequired
text
operationrequired
object
list_music_tracksRead

List the music tracks that the user uploaded, newest first: the musicSlug that set_project_music takes, the title and the length in seconds. read_project_music lists these with the LongStories catalog. Free and read-only.

upload_music_trackWrite

Upload a music file (file or uploadId) as one of the user's own music tracks, as the upload of the music picker does. Uses the same audio format, duration and plan checks as the website. With no title, the track gets the name of the file. Returns the musicSlug that set_project_music takes. Free. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
title
text, at most 200 characters
delete_music_trackWrite

Delete one of the user's uploaded music tracks for good. It cannot be undone, and a video that plays the track has no music at that place after its next export. Call it only when the user asked to delete this exact track. The user approves each delete: the first call returns the approval request, with the title of the track. Free.

musicSlugrequired
text, at most 200 characters
list_songsRead

List the user's songs of the Songs page, newest first: the ID, title, status (pending, ready or failed), length, description and lyrics of each. nextCursor reads the next older page. Free and read-only.

cursor
one of several shapes. Default: null
read_songRead

Read one of the user's songs: its status (pending while it is made, then ready or failed), title, length and lyrics. After make_song, read it again in about a minute until it is ready or failed. The user plays and downloads a song on the Songs page of the website. Free and read-only.

songIdrequired
UUID
quote_songRead

Read the price in credits of a new song, before make_song: a description of the song (prompt), optional lyrics, instrumental for a song with no voice, and the length in seconds. The plan of the user sets the longest length. Starts nothing and charges nothing. Free and read-only.

promptrequired
text, at most 2000 characters
lyrics
one of several shapes
instrumental
true or false
lengthSecondsrequired
whole number, 3 to 600
make_songWrite

Make a new song, as Create song on the Songs page does, at the price that quote_song gave for the same fields (quotedCredits). The credits are reserved at the start and charged when the song is ready; a song that fails is not charged. Returns the songId: read_song says when it is ready. At most 3 songs are made at one time. Requires the user's approval over the spending limits. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

promptrequired
text, at most 2000 characters
lyrics
one of several shapes
instrumental
true or false
lengthSecondsrequired
whole number, 3 to 600
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quotedCreditsrequired
number, 0 or more
delete_songWrite

Delete one of the user's songs for good, as Delete on the Songs page does. It cannot be undone. A music video that plays the song keeps its sound. A song that is still being made cannot be deleted. Call it only when the user asked to delete this exact song. The user approves each delete: the first call returns the approval request, with the title of the song. Free.

songIdrequired
UUID

History and Undo

The list of the edits of a video, the Undo of an edit, and your rating of an edit. Free.

read_edit_historyRead

Read the History of a video, newest first: each edit that the owner sees in the editor, with its id for undo_edit. An entry has its action (for example trim, select_take, set_music, rename_card), who made it (madeBy: 'you' is the owner, 'agent' is an AI app or the LongStories Agent, 'support', 'admin'), the reason that an agent or support gave, and its place: slotKind 'card' with the Card id in slotOwnerId (and a line or clip of the Card in slotItemId), a Shot's picture, clip or sound with the Shot in shotId, or 'project_setting' with the name of the setting in slotOwnerId. reversesEntryId is set on an entry that is itself an Undo. groupSize is how many entries one action wrote; an Undo reverses them together. Edits of the pipeline that made the video are not listed. This changes nothing.

projectIdrequired
UUID
limit
whole number, 1 to 100. Default: 30
beforeId
whole numbernextBeforeId of the page before, for the older entries.
undo_editWrite

Undo one edit: the video goes back to its state before that entry of read_edit_history, as the editor's Undo does. LongStories reverses each entry that this needs (entriesReversed, entryIds), and writes nothing when it cannot put the video back exactly: a change that is not in History came after the entry (drift), a Card moved to another Scene after it (scene_move), a paid voice change came after it (voice_change) or runs now. The refusal names the entry that stops the Undo. This is free and makes no media; the saved video has the change after the next export. An Undo is an entry too, so undo_edit on it puts the edit back.

projectIdrequired
UUID
entryIdrequired
whole numberThe id of an entry of read_edit_history.
rate_editWrite

Record whether an edit entry of read_edit_history worked as expected, with an optional short note. This changes nothing in the video and charges no credits.

projectIdrequired
UUID
editEntryIdrequired
whole numberThe id of an entry of read_edit_history.
workedrequired
true or falseWhether the edit worked as the owner expected.
note
text, at most 500 charactersOptional short note about what went wrong.

Settings, upscale, export and download

The settings of a video, a sharper copy, the finished video file, and one archive of all its files.

update_project_settingsWrite

Change the project title, captions, transition or voiceover playback enablement. This does not generate media. A title change leaves scripts, timing and media unchanged. Read the saved project after a conflict.

projectIdrequired
UUID
settingrequired
one of several shapes
remove_watermarkWrite

Remove LongStories watermark and outro branding from the owned project settings. Requires the owner's existing watermark-removal plan entitlement and current project revision. Preserves custom intro assets. Read the project and export it again to include this change in the final video.

projectIdrequired
UUID
expectedUpdatedAtrequired
text
quote_upscaleRead

Quote higher-resolution video for one Shot, one scene, or the scene-based project. Story Card videos use a Shot target. Returns the credits for the current video sources, and the revision to pass to upscale_video. The charge is at most these credits. The plan of the account must include upscaling. This starts nothing.

projectIdrequired
UUID
targetrequired
one of several shapes
targetResolution
one of. Default: "1080p"1080p2k4k
targetFps
one of. Default: "30fps"30fps60fps
quality
one of. Default: "basic"basicbetter
upscale_videoWrite

Start video upscaling from an accepted source revision and credit quote. Requires customer confirmation. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

projectIdrequired
UUID
targetrequired
one of several shapes
targetResolution
one of. Default: "1080p"1080p2k4k
targetFps
one of. Default: "30fps"30fps60fps
quality
one of. Default: "basic"basicbetter
requestIdrequired
UUID
revisionrequired
text
quotedCreditsrequired
number
retryOfRequestId
UUID
inspect_exportRead

Check whether current project content is ready to export. Reports output dimensions, duration and a content signature. Does not start rendering.

projectIdrequired
UUID
start_exportWrite

Render the saved project with a supported quality and export preset. Keep attemptId after a lost reply. New attemptId means a new render. Check readiness first.

projectIdrequired
UUID
exportPreset
one of. Default: "default"default2k_304k_304k_60
quality
one of. Default: "high"highmediumlow
attemptIdrequired
UUID
observe_exportRead

Read a prior export attempt. This never starts another render. A successful attempt can still be behind current edits; read_export checks that.

projectIdrequired
UUID
attemptIdrequired
UUID
read_exportRead

Read the saved final video and compare it with current edits. Only saved.state=current confirms the export includes those edits.

projectIdrequired
UUID
download_project_filesWrite

Ask for one ZIP archive of the files of the user's own video, as Download all on the website does: the picture, the clip and the sound of each shot. includeHistory adds the earlier takes; includeStitched adds the finished film, and the user then gets an email when the archive is ready. Needs a plan that downloads clips. The archive builds in the background: status processing gives an assetId for read_project_download; status ready gives downloadUrl, a link that works for 10 minutes. Give that link to the user at once. For only the finished video, use the export tools. Free.

projectIdrequired
UUID
includeHistory
true or false. Default: false
includeStitched
true or false. Default: false
read_project_downloadRead

Read the state of an archive that download_project_files started: processing, failed, or ready with downloadUrl, a new link that works for 10 minutes. Wait some seconds between two reads. Free and read-only.

assetIdrequired
UUID

My Videos and posts

Who can see a video, your rating, a delete, a report to support, and posts to YouTube, Instagram and Facebook.

set_project_visibilityWrite

Choose who can watch a video, as Share does on the website: private (only the owner), unlisted (anyone with the link) or public (anyone, and the video can appear on LongStories pages). Change it only when the user asked for it. Returns the share link; it works for others only when the video is unlisted or public. Free.

projectIdrequired
UUID
visibilityrequired
one ofprivateunlistedpublic
rate_videoWrite

Save the user's thumbs up or thumbs down on the saved video of a project, as the page of the video does. Use it only to pass on the user's own opinion, in the user's words in this conversation; never rate a video yourself. Null takes the vote back. Free.

projectIdrequired
UUID
ratingrequired
one of several shapes
regenerate_thumbnailWrite

Make a new thumbnail picture for a finished video, as Regenerate Thumbnail in My Videos does. The picture is made in the background in about a minute; read the project again to see it. Only a completed video gets one. Free for the user.

projectIdrequired
UUID
delete_projectWrite

Delete a video from My Videos, as Delete on the website does: the project goes out of the list of projects and its editor. Call it only when the user asked in this conversation to delete this exact video: name its title, and ask first if there is any doubt. Free.

projectIdrequired
UUID
report_issueWrite

Send the user's report of a problem with one of their videos to the LongStories support team, as Report issue on the website does. Write the user's own words: what is wrong, and where in the video. Send it only when the user asked to report it. Support answers the user by email or in the chat of the website. Free.

projectIdrequired
UUID
feedbackrequired
text, at most 5000 characters
list_social_accountsRead

List the YouTube, TikTok, Instagram and Facebook accounts that the user connected on the website, with their IDs for the posting tools, and the platforms that the user can post to (availablePlatforms). To connect a new account, the user opens Share on a video on the LongStories website. Free and read-only.

read_post_formRead

Read what the Share sheet of a finished video shows before a post: the facts of the video, canPost (false: posting needs an active paid plan), scheduleBefore (a schedule must be before this time, when the plan is set to end), each connected account with fits (false with the reason when the platform does not take this video), and the cover choices (stills of the video, each with a coverId and a link to show the user). Call it before post_video. Post to TikTok on the website: Share on the page of the video.

projectIdrequired
UUID
post_videoWrite

Post a finished video of the user to one connected YouTube, Instagram or Facebook account, now or at a time, as Post and Schedule in the Share sheet do. The post is public on the platform as its privacy says, and LongStories cannot remove a published post: call it only when the user asked to post this video to this account, and show the user the text first. The user approves each post (the account, the visibility, the time and the text). One call posts to one account. Free; posting needs an active paid plan. Keep requestId after a lost reply: the same requestId is one post. Follow the post with list_posts; cancel_post stops a post that waits.

projectIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
accountIdrequired
UUIDFrom list_social_accounts or read_post_form.
detailsrequired
one of several shapesFor YouTube: title, description, tags, privacy (private, unlisted or public), madeForKids and containsSyntheticMedia. Ask the user for privacy and madeForKids; containsSyntheticMedia is true for a video with realistic AI pictures of people, places or events. For Instagram and Facebook: caption.
coverId
textA cover choice of read_post_form. Only YouTube and Instagram take a cover.
scheduledFor
textAn ISO time with its offset, 15 minutes or more from now. With no time, the post goes up now. A scheduled YouTube post is public.
list_postsRead

List the user's posts of videos to platforms, newest first, 50 a page, as the Posts tab shows them: the video, the account, the status (scheduled, queued, uploading, processing, published, failed, needs_review, canceled, stopped; a successful post is published), the time, the link and the error. Filter by status or account. Free and read-only.

page
whole number, 0 or more. Default: 0
status
one ofscheduledqueueduploadingprocessingpublishedfailedneeds_reviewcanceledstopped
accountId
UUID
cancel_postWrite

Cancel a post that is queued or scheduled, as Cancel in the Posts tab does. A post that started its upload cannot be canceled. Only when the user asked to cancel this post. Free.

postIdrequired
UUID
set_series_postingWrite

Make a planned series post each new episode to the accounts that the user picks, or change those accounts, as Auto-share on the page of the series does. Each post is public on that platform, so call it only when the user asked for it and named the accounts. A YouTube account needs the user's answers: privacy, made for kids, and contains synthetic media. The user approves each change (the series, each account and its answers); a call that changes nothing asks no question and answers unchanged. Needs a paid plan. Returns how many waiting posts of removed accounts were canceled. Free.

seriesIdrequired
UUID
targetsrequired
list of object
turn_off_series_postingWrite

Stop the posts of the new episodes of a series to every account, and cancel its posts that still wait for their time, as on the page of the series. Free.

seriesIdrequired
UUID

Series

The next episode of a video, the plan of a series, its schedule, and what to do with an episode that failed.

prepare_next_episodeWrite

Prepare the next episode from an owned completed video, just as Create does. Creates no series: a video in no series gets seriesId null, and generate_video makes the series with the episode. creationSettings.series also takes joinSeriesId, with seriesId null: generate_video then adds the video to that series of the user (made by hand, in its universe, not the Open universe, no plan; ids from list_series), and the episode continues it. Fills missing story records of an existing series; no video is generated and no customer credits are charged. Returns safe story records and creationSettings. Add the user's next-episode idea and an operationKey, then quote_video_creation and generate_video. Read the source project's Cards if any story record is missing. Keep requestId after a lost reply.

projectIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
list_seriesRead

List the user's series, newest first: the ID and title of each, whether it has a plan (planned), whether it is paused, and its episodes with their project IDs. A series of one video with no plan is not in the list. Free and read-only.

read_seriesRead

Read one of the user's series as its page shows it: the status and the schedule, the made episodes, and the planned episodes with their IDs and status (planned, making, failed, skipped). revision names this state of the series: change_series_plan takes it. A failed planned episode waits for the user's choice: skip_failed_episode or try_failed_episode_again. Free and read-only.

seriesIdrequired
UUID
save_series_planWrite

Save a new plan of a series in a universe that the user can make videos in, as the plan page does: a title, a theme (what the series is about), a schedule (back_to_back: each episode when the one before is ready; daily or weekly: with time as HH:MM and an IANA timezone), and the planned episodes in order, each with a title and an idea. Write the ideas with the user. It makes a draft: it starts nothing and is free. A draft starts when it gets its first episode: add a finished video of the same universe with add_video_to_series (the user approves the price of the planned episodes), or the user makes episode 1 on the create page of the LongStories website. To change a saved draft, call change_series_plan.

universeSlugrequired
text
titlerequired
text
themerequired
text
schedulerequired
object
episodesrequired
list of object
change_series_planWrite

Change the plan of a series, as the page of the series does: its open planned episodes (edit, move, remove, add), and optionally its title, its theme and its schedule. episodes is the whole open plan in its new order: read_series first, send its revision, each planned episode that stays with its plannedEpisodeId (status planned only), and a new episode with no ID. An open planned episode that is not in the list is removed from the plan. The plan is saved only when the series still has that revision: a series that changed after that read is a conflict (reason series_changed) and nothing is saved, so read the series again and make the change again. title, theme and schedule stay as they are when you do not send them. This tool starts nothing and is free, so it never lets a series make more episodes without the user's yes: on a series that makes its planned episodes now, a change that adds episodes or changes the schedule is refused (pause_first). Call pause_series, read the series again, make the change, then resume_series: the resume asks the user with the count and the price. On a series with no schedule, the planned episodes wait for start_series_plan, which asks the user with the price. The answer says the state of the series (state): running, paused, draft (its first episode is not made yet) or waits_for_start.

seriesIdrequired
UUID
revisionrequired
text
title
text
theme
text or null
schedule
object
episodesrequired
list of object
quote_series_startRead

Read the price of the start of the planned episodes of a series with no schedule (read_series: state waits_for_start): how many planned episodes start, the price in credits of one, and the total at the price of now. status nothing_to_start: the series has a schedule already, has no open planned episode, or an episode is being made. Read it before start_series_plan, and tell the user the price. Free and read-only.

seriesIdrequired
UUID
start_series_planWrite

Start the planned episodes of a series with no schedule, as Start on the page of the series does. It sets the schedule (back_to_back, or daily or weekly with time as HH:MM and an IANA timezone: ask the user), makes the next episode at once, and then makes each planned episode on the schedule and charges each one when it makes it. The user approves each start: the first call returns the approval request, with the schedule, the titles and the ideas of the planned episodes, their count and the price of one. A change of the plan after the question asks again. The answer says what the series does now (status): started (with episodeNumber), waiting (for credits or a plan), paused, or queued. Call it only when the user asked to start this series.

seriesIdrequired
UUID
schedulerequired
object
quote_series_planRead

Read what the plan of a series makes and charges next: how many planned episodes are open, the price in credits of the next one, and each failed planned episode. The series charges each episode when it makes it, at the price of that time. Read it before resume_series or skip_failed_episode, and tell the user the price. Free and read-only.

seriesIdrequired
UUID
pause_seriesWrite

Pause a planned series, as Pause on the page of the series does: no new episode is made until the user resumes it (resume_series). An episode that is being made goes on. Free.

seriesIdrequired
UUID
resume_seriesWrite

Resume a paused planned series, as Resume on the page of the series does. The series then makes its open planned episodes on its schedule and charges each one when it makes it. The user approves each resume: the first call returns the approval request, with the count of the planned episodes and the price of the next one. A series with a failed planned episode cannot resume before the user skips that episode (skip_failed_episode) or tries it again (try_failed_episode_again). The answer says whether the series runs now (resumed) or is still paused. still_paused with seriesChanged: the series or its plan changed in that moment, and nothing was resumed: call the tool again, and it asks the user with the plan of now. Call it only when the user asked to resume this series.

seriesIdrequired
UUID
skip_failed_episodeWrite

Skip a failed planned episode, as Skip it on the page of the series does. Take plannedEpisodeId from quote_series_plan or read_series (status failed). The pause that the failure made then ends, and the series goes on with its open planned episodes and charges each one when it makes it; a series that the user paused stays paused. The user approves a skip that lets the series go on: the first call returns the approval request, with the count of the planned episodes and the price of the next one. The answer says whether the series is still paused (seriesPaused). Call it only when the user chose to skip this episode.

seriesIdrequired
UUID
plannedEpisodeIdrequired
UUID
try_failed_episode_againWrite

Make a failed planned episode again, as Try episode again on the page of the series does. Take plannedEpisodeId from quote_series_plan or read_series (status failed); quote_series_plan gives the price of the new try (retry). The episode starts at once and is charged at its normal price; the series then goes on with its open planned episodes and charges each one when it makes it. The user approves each new try that can start: the first call returns the approval request, with the title and the idea of the episode, its price, and the count of the planned episodes after it. A conflict with reason series_changed means that the series or this episode changed in that moment (a pause, a resume, an edit): nothing started, so call the tool again, and it asks with the series of now. On a series that the user paused, the episode goes back to the plan and nothing starts before resume_series. The answer says what the series does now (status): started (with episodeNumber), waiting (for credits or a plan), paused, queued (it starts in a few minutes), or draft (no episode is left to copy: the user makes episode 1 again on the LongStories website). To change the title or the idea first, call edit_failed_episode. Call it only when the user chose to try this episode again.

seriesIdrequired
UUID
plannedEpisodeIdrequired
UUID
edit_failed_episodeWrite

Change the title and the idea of a failed planned episode before try_failed_episode_again, as the page of the series does. Send both: read_series gives the ones of now. Starts nothing. Free.

seriesIdrequired
UUID
plannedEpisodeIdrequired
UUID
titlerequired
text
idearequired
text
list_addable_videosRead

List the user's finished videos that can join a series as its next episode, newest first: videos of the universe of the series that are in no series. nextEpisodeNumber is the number that an added video gets. Free and read-only.

seriesIdrequired
UUID
add_video_to_seriesWrite

Add one of the user's finished videos to a series as its next episode, as Add a video on the page of the series does (list_addable_videos gives the videos that can join). On a series that has episodes, the add is free and asks nothing. On a planned series with no episode (a draft plan, or a plan that lost its videos) the video becomes its episode and the series starts: it makes its planned episodes on its schedule, the first one at once, continuing this video with its settings, and charges each one when it makes it. So the user approves that add: the first call returns the approval request, with the titles and the ideas of the planned episodes, the schedule of the series, their count and the price of one. A change of the plan or of the schedule after the question asks again. The answer has episodeNumber, and for a draft what the series does now (start). A refusal says why in details.reason: wrong_universe, project_in_series, project_not_finished, series_busy (an episode is being made), plan_changed. Call it only when the user asked to add this video to this series.

seriesIdrequired
UUID
projectIdrequired
UUID
remove_video_from_seriesWrite

Take one video out of a series, as Remove from series does: the video stays in My Videos and the later episodes move up one number. read_series says what happens to the series (afterRemoval): a series with no episode left is archived. Only when the user asked for it. Free.

seriesIdrequired
UUID
projectIdrequired
UUID
rename_seriesWrite

Give a series a new title. Free.

seriesIdrequired
UUID
titlerequired
text
delete_seriesWrite

Delete one of the user's series, as Delete on the page of the series does: the series is archived, its posting to platforms stops and its waiting posts are canceled. Its videos stay in My Videos. Refused while an episode is being made. Call it only when the user asked to delete this exact series: name it first. Free.

seriesIdrequired
UUID

Characters, locations and objects

The cast of one video, your library of saved characters, locations and objects, their texts and their pictures.

read_elementsRead

Read project character, location and object handles and reference preparation status. Optionally list accessible library elements. Use these handles in scripts and references.

projectIdrequired
UUID
libraryKind
one ofcharacterlocationobject
attach_elementWrite

Attach an accessible library character, location or object. Repeating the same source keeps one attachment. No media is generated.

projectIdrequired
UUID
sourcerequired
one of several shapes
create_elementWrite

Create a reusable location or object from its customer description and attach it. Saves text only. Keep requestId after a lost reply.

projectIdrequired
UUID
requestIdrequired
UUID
kindrequired
one oflocationobject
namerequired
text, at most 120 characters
descriptionrequired
text, at most 4000 characters
detach_elementWrite

Detach a project element where the editor permits it. Existing references can prevent removal.

projectIdrequired
UUID
elementrequired
one of several shapes
prepare_elementWrite

Generate an attached element reference after native confirmation of its current revision and quoted credits. Repeated requests use the same saved attempt. Read elements until ready.

projectIdrequired
UUID
elementrequired
one of several shapes
requestIdrequired
UUID
revisionrequired
text, at most 64 characters
quotedCreditsrequired
number, 0 or more
read_newer_element_versionsRead

List the characters, locations and objects of this video that have a newer version in the account's library, as the editor's 'Use it here' offers them. Each one has its name, the version that the video has (pinnedVersion), the newest version (newestVersion, newestVersionId), newLook (true: the newer version has a new picture, and one image is drawn in the style of the video) and credits (the price to use it here; 0 when the change is free). This changes nothing.

projectIdrequired
UUID
use_newer_element_versionWrite

Move this video to the newest version of one of its elements, as the editor's 'Use it here' does. Pass kind, elementId, newestVersionId (as toVersionId) and credits (as quotedCredits) of read_newer_element_versions. A version with a new look draws one image in the style of the video and requires the person's approval of its price; a version with new text only is free. Media that the video already has keeps the old version until it is made again. Keep requestId after a lost reply: the same request gives its saved answer and applies nothing again; read_operation reads it too.

projectIdrequired
UUID
kindrequired
one ofcharacterlocationobject
elementIdrequired
UUID
toVersionIdrequired
UUID
quotedCreditsrequired
number, 0 or more
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
read_character_libraryRead

Read your saved characters, their descriptions, appearance, clothing, and selected voices. Returns at most 24 characters per page.

page
whole number, 1 to 1000000. Default: 1
create_characterWrite

Create a reusable character from its name, description, appearance, and clothing, with an optional personality (at most 600 characters) and speech, how they talk (at most 400). Your character limit applies. This does not generate an image. Keep the same request ID after a lost reply.

namerequired
text, at most 120 characters
descriptionrequired
text
appearancerequired
text
clothingrequired
text
personality
text, at most 600 characters. Default: ""
speech
text, at most 400 characters. Default: ""
requestIdrequired
UUID
create_characters_from_imageWrite

Create reusable characters from an image (file or uploadId). Uses the same image analysis, moderation and character limit as the character library. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
create_saved_elementWrite

Create a location or an object in the user's library, as Create on the Characters page does, from its name and its description (what its picture shows). With a photo of the real place or object (file or uploadId), the picture is drawn from that photo. This saves text and the photo only and is free: it draws no picture. Returns the elementId, the handle for scripts, and pictureCredits, the price of make_element_picture. To make a location or an object for one video only, use create_element. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
kindrequired
one oflocationobject
namerequired
text, at most 120 characters
descriptionrequired
text, at most 2000 characters
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
read_saved_elementRead

Read one saved character, location or object of the user's library, as its edit page shows it: the name, handle, description, appearance, clothing, personality and speech, the current version ID and the earlier versions, the number of videos that use it, and the star. Each pictureUrl is a link to a picture that works for 1 hour: show it to the user. lookChange is the newest look change (status drawing, applied or failed) and lookChangeCredits is the price of change_element_look. Read it before change_saved_element_text or restore_saved_element_version, which need the current version ID and handle. Free and read-only.

kindrequired
one ofcharacterlocationobject
elementIdrequired
UUID
change_saved_element_textWrite

Change the words of a saved element, as Save on its edit page does: the name, and for a character its description, personality and speech (empty text clears personality or speech). A place or an object changes its description with a new look, not here. Pass expectedVersionId, expectedHandle and expectedHandleChosen from read_saved_element; mentionHandle null keeps the handle following the name. A save makes a new version; videos that are made keep their version. Free.

kindrequired
one ofcharacterlocationobject
elementIdrequired
UUID
expectedVersionIdrequired
UUID
expectedHandlerequired
text, at most 80 characters
expectedHandleChosenrequired
true or false
namerequired
text, at most 120 characters
description
text, at most 2000 characters
personality
text, at most 600 characters
speech
text, at most 400 characters
mentionHandlerequired
one of several shapes
restore_saved_element_versionWrite

Make an earlier version of a saved element the current one, as Restore on its edit page does. Pass the versionId to restore and expectedVersionId (the current version) from read_saved_element. Free.

kindrequired
one ofcharacterlocationobject
elementIdrequired
UUID
versionIdrequired
UUID
expectedVersionIdrequired
UUID
set_element_starWrite

Star or unstar one of the user's saved characters, locations or objects, as the star on the Characters page does. Free.

entityTyperequired
one ofcharacterlocationobject
idrequired
UUID
favoriterequired
true or false
change_element_lookWrite

Draw a new look for one saved character, location or object of the user's library, as the edit page of the element does. way describe: instruction says what to change in the picture that the element has (the element needs a picture). way redraw: fields gives the look text and a new picture is drawn from it; a character takes appearance and clothing, a location or an object takes description. The result is a new version of the element: a video that is made keeps the version that it used. Costs credits: pass lookChangeCredits of read_saved_element as quotedCredits. The credits are reserved at the start and charged when the picture is ready; a look that fails is not charged. Requires the user's approval over the spending limits. One look is drawn for an element at a time. Then read_saved_element about each 20 seconds: lookChange.status goes from drawing to applied or failed, and pictureUrl is the new picture. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
kindrequired
one ofcharacterlocationobject
elementIdrequired
UUID
wayrequired
one ofdescriberedraw
instruction
text, at most 1000 characters
fields
object
quotedCreditsrequired
number, 0 or moreThe price that the read of this element gave, unchanged.
read_character_picturesRead

Read the pictures of one saved character of the user's library (its reference sheet), as the Characters page shows them: sheetStatus (null: no pictures yet; pending: they are drawn now; completed; failed), contentRefused (the image models refused the character on their content rules), pictureUrl (a link to the pictures that works for 1 hour; show it to the user) and credits (the price of make_character_pictures). Free and read-only.

characterIdrequired
UUID
make_character_picturesWrite

Draw the pictures of one saved character of the user's library (its reference sheet), as Generate on the Characters page does. Costs credits: pass credits of read_character_pictures as quotedCredits. The credits are reserved at the start and charged when the pictures are ready; pictures that fail are not charged. Requires the user's approval over the spending limits. A character that has pictures is not drawn again without again=true, and new pictures are a new version of the character: a video that is made keeps the version that it used. Then read_character_pictures about each 20 seconds until sheetStatus is completed or failed. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
characterIdrequired
UUID
again
true or false. Default: falsetrue draws new pictures for a character that has pictures.
quotedCreditsrequired
number, 0 or moreThe price that the read of this element gave, unchanged.
read_element_pictureRead

Read the library picture of one saved location or object of the user: pictureUrl (a link to the picture; null while there is none; show it to the user), failed (the last drawing failed and was not charged) and credits (the price of make_element_picture). Free and read-only.

kindrequired
one oflocationobject
elementIdrequired
UUID
make_element_pictureWrite

Draw the library picture of one saved location or object of the user, as the create dialog of the Characters page does after create_saved_element. It is drawn from the description, and from the photo when the element has one. Costs credits: pass pictureCredits of create_saved_element, or credits of read_element_picture, as quotedCredits. The credits are reserved at the start and charged when the picture is ready; a picture that fails is not charged. Requires the user's approval over the spending limits. Then read_element_picture about each 20 seconds until pictureUrl is there or failed is true. An element that has its picture is refused (conflict, reason has_picture): to change that picture, use change_element_look. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
kindrequired
one oflocationobject
elementIdrequired
UUID
quotedCreditsrequired
number, 0 or moreThe price that the read of this element gave, unchanged.
read_universe_character_pictureRead

Read the picture of one saved character of the user's library in the style of a universe, as the universe gallery of the character's page shows it: pictureUrl (null: the character has no picture in this universe; the link works for 24 hours) and credits, the price of a new picture. The universe is one of the user's own or a public one. Free.

characterIdrequired
UUID
slugrequired
text, at most 200 charactersThe slug of the universe.
make_universe_character_pictureWrite

Draw a picture of one saved character of the user's library in the style of a universe, as the redraw button of the universe gallery on the character's page does. The picture is drawn in this call, which can take a minute, and it replaces the picture that the character has in this universe. Costs credits: pass credits of read_universe_character_picture as quotedCredits. A picture that is not drawn is not charged. Text that moderation refuses is refused (content_refused) and nothing is charged. Read read_universe_character_picture for the link of the new picture. A repeat with the same requestId gives the same answer and draws nothing more. When the answer says that the result is not known (uncertain), read read_universe_character_picture before you draw again with a new requestId.

characterIdrequired
UUID
slugrequired
text, at most 200 charactersThe slug of the universe.
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
quotedCreditsrequired
number, 0 or moreThe price that the read of this element gave, unchanged.
archive_characterWrite

Archive one of the user's saved characters, or restore it with archived false, as Archive and Restore on the Characters page do. An archived character stays in the videos that use it, and goes out of the picker. A restore counts against the character limit of the plan. Free.

characterIdrequired
UUID
archivedrequired
true or false
read_character_deletion_impactRead

Read what a permanent delete of one of the user's saved characters changes, as the delete dialog of the Characters page shows it: the videos that use the character (the delete takes it out of each), how many universe pictures go, and blockedBy when a video that is being made holds the character. Read it when the user asks what a delete does, or to name the videos before delete_character. Free and read-only.

characterIdrequired
UUID
delete_characterWrite

Delete one of the user's saved characters for good, as Delete forever on the Characters page does. It cannot be undone: the character goes out of each video that uses it, and its pictures are deleted. To only hide a character, use archive_character. Call it only when the user asked to delete this exact character for good. The user approves each delete: the first call returns the approval request, with the name and the number of videos. status pending means that the delete goes on in the background: do not say that it is done. Free.

characterIdrequired
UUID

Universes

The world of your stories: its texts, its cast, its cover and profile picture, its intro, outro and watermark.

list_universesRead

List the user's own universes and the featured universes, with the slug that quote_video_creation and generate_video take. Free and read-only.

discover_universesRead

Find public universes of other users, as the Discover page does. With a query: a search by name and description. With no query: the popular ones of this month and the new ones. Each has the slug that read_universe, quote_video_creation and generate_video take. Free and read-only.

query
text, at most 80 characters. Default: ""
read_universeRead

Read one universe by its slug: its name, description and example prompts. A private universe of another user is not found. Free and read-only.

slugrequired
text, at most 200 characters
read_universe_pickerRead

The universe picker of the create page of the website. With no slug: the universes that the user used last (recent), the user's own (yours), the ones of LongStories (longstories) and the featured ones of other users (community). Each has the slug that quote_video_creation and generate_video take, how many public videos were made in it, how many characters it has and the names of the first ones. With a slug: the preview of that universe before the user picks it: its cast (characters, locations and objects by name), some example ideas, and some public videos made in it with a link to watch each one. A private universe of another user is not found. Free and read-only.

slug
text, at most 200 characters
read_universe_settingsRead

Read one of the user's own universes as the "Your universe" page shows it: each field that change_universe takes, with the same name, the linked styles with their names, and the characters that the AI suggests (suggestedCharacters, with suggestedCharacterCredits: the price of take_suggested_character for one of them). A universe of another user is not found. Free and read-only.

slugrequired
text, at most 200 characters
create_universeWrite

Make a new universe, as the create wizard of the website does: give a name and one description of the world (initialPrompt), and the AI writes the public description, the Lore, the Rules, the Art direction and example ideas. The universe is public when you do not say (anyone can find it and make videos in it), as in the wizard; isPublic false makes a private universe, which needs a subscription. Tell the user whether the new universe is public or private. visualStyleId is a style of list_visual_styles; with none, the AI chooses a style. elements links the user's own saved characters, locations and objects, each with how it fits (role). audience is optional: the AI chooses it. Free: its first pictures are drawn at no cost after the answer. Give a requestId of your own: a second call with the same requestId gives the same universe. A refusal with details.code elements_not_linked means that the universe exists (details.slug) and its cast is not linked: link it with change_universe. It takes about a minute.

requestIdrequired
text, at most 80 characters
namerequired
text, at most 50 characters
initialPromptrequired
text, at most 10000 characters
isPublic
true or false. Default: true
elements
object. Default: {}
audience
one of several shapes. Default: null
visualStyleId
UUID
change_universeWrite

Change one of the user's own universes, as Save on the "Your universe" page does. Send only the fields that change; a field that you do not send stays as it is. Read read_universe_settings first: a list (characters, locations, objects, visualStyleIds, examplePrompts, additionalVoices) replaces the saved list, so send each item that must stay. characters, locations and objects are the user's own saved elements, each with how it fits (role). castPolicy says which characters a video of this universe can have: open (its cast and the characters of the person who makes the video), universe_and_generated, or universe_only. isPublic false needs a subscription. musicSlug is a track of list_music_tracks or of the LongStories catalog (read_project_music). imageModel, customImageModelEnabled, videoModel and customModelEnabled need a plan that selects models. Free; it starts no work.

initialPrompt
text, at most 10000 characters
isPublic
true or false
forKids
true or false
characters
list of object, at most 100
locations
list of object, at most 100
objects
list of object, at most 100
castPolicy
one ofopenuniverse_and_generateduniverse_only
allowScriptInput
true or false
allowAudioInput
true or false
allowSongInput
true or false
captionsEnabled
true or false
captionsStyle
one ofnonedefaultminimalneoncinematicfancytiktokhighlightgradientintellectualvidamanuscriptssubtitlemodernbouncepopcorntypewriterhandwrittenkaraokeretrogaming
captionsPosition
one ofcenterbottomtop
musicEnabled
true or false
musicVolume
number, 0 to 1
voiceEnabled
true or false
imageModel
one ofz_image_turboflux_schnellimagen4_fastsdxlhidream_fastleonardo_flux_precisionbytedance_seedream_v3bytedance_seedream_v4bytedance_seedream_v45bytedance_seedream_v5_litebytedance_seedream_v5_probytedance_seedream_v5_pro_editbytedance_seedream_v5_pro_fastbytedance_seedream_v5_pro_fast_editbytedance_seedream_v45_editbytedance_seedream_v5_lite_editbytedance_seedream_v4_editnano_banana_editnano_banana_2nano_banana_2_litenano_banana_2_lite_editnano_banana_2_editqwen_image_edit_multiple_anglesnano_banana_pronano_banana_pro_editglm_imageglm_image_editmeta_muse_imagemeta_muse_image_editmai_image_25mai_image_25_editmai_image_25_promai_image_25_pro_editmai_image_26mai_image_26_flashgpt_image_2_lowgpt_image_2_mediumgpt_image_2gpt_image_2_edit_lowgpt_image_2_edit_mediumgpt_image_2_editgpt_image_25_flare_lowgpt_image_25_flare_mediumgpt_image_25_flare_highgpt_image_25_flare_low_editgpt_image_25_flare_medium_editgpt_image_25_flare_high_editgpt_image_25_sunburst_lowgpt_image_25_sunburst_mediumgpt_image_25_sunburst_highgpt_image_25_sunburst_low_editgpt_image_25_sunburst_medium_editgpt_image_25_sunburst_high_editgpt_image_26_sunburst_mediumgpt_image_26_sunburst_medium_editgrok_imagine_2grok_imagine_2_editsd35_mediumsd35_large_turbofal-ai/gemini-25-flash-imagereve-v1hidream_devqwen_imageleonardo_phoenix_qualityflux_prorecraftsd35_largeflux_pro_ultrahidream_fullmidjourneyleonardo_phoenix_ultragpt_image_1fal-ai/imagen4/previewnano_banana_21_edit
customImageModelEnabled
true or false
customModelEnabled
true or false
slugrequired
text, at most 200 characters
displayName
text, at most 50 characters
description
text, at most 2000 characters
lore
text, at most 6000 characters
rules
text, at most 2000 characters
artDirection
text, at most 4000 characters
audience
one of several shapes
examplePrompts
list of text, at most 1000 characters, at most 20
visualStyleIds
list of UUID, at most 50
musicSlug
text, at most 200 characters
voiceId
text, at most 200 characters
narratorLabel
text, at most 200 characters
additionalVoices
list of object, at most 20
videoModel
one ofseedance_2seedance_2_fastseedance_2_miniseedance_15_prominimax_h3_image_to_videominimax_h3_max_turbopixverse_v6pixverse_v55seedance_1_proseedance_1_fastkling_v3_stdkling_v2_5_turbo_stdkling_v2_5_turbo_proveo_31veo_31_fastveo_31_litekling_v3_prokling_o3_stdhailuo_23wan_27vidu_q3ltx_23grok_imagineskyreels_v4runway_gen45
fill_universeWrite

Let the AI write the texts of one of the user's own universes again, as "Fill it in again from this" on the "Your universe" page does: from its saved name, cast and styles, and from its original description (initialPrompt: give a new one, or leave it out to use the saved one). The answer has a new description, lore, rules, artDirection and audience. They are NOT saved: show them to the user, then save the ones that the user wants with change_universe (with the new initialPrompt, if you gave one). The characters that the AI suggests are replaced at once. Free.

slugrequired
text, at most 200 characters
initialPrompt
text, at most 10000 characters
delete_universeWrite

Delete one of the user's own universes, as Delete on the universe page does: it is archived and goes out of the lists. Its videos stay. Call it only when the user asked to delete this exact universe: name it first. Free.

slugrequired
text, at most 200 characters
send_universe_feedbackWrite

Tell the LongStories team what is wrong with a universe, in the user's words. Give the slug and the name of the universe as list_universes or read_universe gave them. It sends one email to the team and a receipt to the user's own address. Send it only when the user asked for it. For a problem with one video, use report_issue. Free.

slugrequired
text, at most 200 characters
namerequired
text, at most 200 characters
feedbackrequired
text, at most 5000 characters
take_suggested_characterWrite

Add a character that the AI suggests to the cast of one of the user's own universes, as "Add to cast" on the "Your universe" page does: the character is made in the user's library from the suggestion, its pictures are drawn, and it is linked to the universe with how it fits. suggestionId is the id of one of suggestedCharacters of read_universe_settings. Costs credits: pass suggestedCharacterCredits of read_universe_settings as quotedCredits. The credits are reserved at the start and charged when the pictures are ready; pictures that fail are not charged. Requires the user's approval over the spending limits. The answer has the characterId, and pictures says what the start of its pictures did. drawing: the credits are reserved, and read_character_pictures shows the pictures. not_started: the character exists, and no credits are reserved; start its pictures with make_character_pictures. unknown: the start failed in a way that the tool cannot read (credits is null); read read_character_pictures for the state of now before you start them again. linked false means that the character exists and is not in the cast: link it with change_universe. The character limit of the plan applies, and a universe has a limit of characters. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

slugrequired
text, at most 200 characters
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
suggestionIdrequired
UUID
quotedCreditsrequired
number, 0 or moresuggestedCharacterCredits of read_universe_settings, unchanged.
dismiss_suggested_characterWrite

Remove a character that the AI suggests from the suggestions of one of the user's own universes, as "Dismiss" on the "Your universe" page does. The suggestion goes for good; fill_universe writes new suggestions. Call it only when the user asked to remove this suggestion. Free.

slugrequired
text, at most 200 characters
suggestionIdrequired
UUID
read_universe_picturesWrite

Read the cover and the profile picture of one of the user's own universes, as the header of the "Your universe" page shows them: the pictures in use (coverUrl, profileUrl), the newest set of drawn pictures (newestSet: drawing, choosing, done or failed, with each picture), the earlier pictures (the 12 newest of each kind) and the prices of make_universe_pictures (credits). A link works for 24 hours: give the links to the user, and look at them yourself with view_pictures. While newestSet.status is drawing, read again about each 20 seconds. A set whose drawing was lost for 15 minutes is closed by this read, and the credits of its pictures that were not drawn go back. Free.

slugrequired
text, at most 200 characters
make_universe_picturesWrite

Draw new pictures for the header of one of the user's own universes, as New covers, New profile picture, Redraw with a note and Try again on the "Your universe" page do. Give exactly one of target, note and setId. The pictures are drawn in the style of the universe with its cast. The new pictures do not replace the picture in use: they are options, and use_universe_picture puts one in use. Costs credits: the credits are reserved at the start and charged for each picture that is drawn; a picture that fails is not charged. A try again of the first free set of a universe is free. Requires the user's approval over the spending limits. One set is drawn for a universe at a time, and an account draws or uploads 10 times an hour at most. Then read_universe_pictures about each 20 seconds until newestSet.status is choosing or failed. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

slugrequired
text, at most 200 characters
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
target
one ofcoverprofilebothNew pictures: cover (3 covers to choose from), profile (1 profile picture) or both.
note
text, at most 300 charactersDraw the cover in use again with this change, in the user's words. 1 picture.
setId
UUIDTry again: the setId of newestSet when its status is failed.
quotedCreditsrequired
number, 0 or moreThe price from read_universe_pictures, unchanged: credits.cover, credits.profile or credits.both for target, credits.note for note, newestSet.tryAgainCredits for setId.
use_universe_pictureWrite

Put one drawn or earlier picture of one of the user's own universes in use as its cover or its profile picture, as Use on the "Your universe" page does. pictureId is a picture of read_universe_pictures with status ready. The picture that was in use stays in the earlier pictures. Call it only when the user chose this picture. Free.

slugrequired
text, at most 200 characters
pictureIdrequired
UUID
close_universe_picture_setWrite

Close the newest set of drawn pictures of one of the user's own universes with no new choice, as Close on the "Your universe" page does. Its pictures stay in the earlier pictures, and nothing in use changes. Free.

slugrequired
text, at most 200 characters
setIdrequired
UUID
upload_universe_pictureWrite

Upload a picture (file or uploadId) as the cover or the profile picture of one of the user's own universes, as Upload your own on the "Your universe" page does: a PNG, JPEG or WebP of 15 MB at most, with the image check of the website. The picture goes in use at once, and the picture that was in use stays in the earlier pictures. It is refused while a set is drawn. An account draws or uploads 10 times an hour at most. Free. Keep requestId after a lost reply.

slugrequired
text, at most 200 characters
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
kindrequired
one ofcoverprofile
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
upload_universe_template_fileWrite

Upload the intro, the outro or the watermark of one of the user's own universes (file or uploadId), as "Intro, outro and watermark" on the "Your universe" page does. An intro or an outro is an MP4 or MOV video (H.264) of 20 seconds and 20 MB at most; for a file on the user's computer, start_file_upload takes it with kind video. A watermark is a PNG, JPEG or WebP picture of 20 MB at most. The file and picture checks of the website apply. The file takes the place of the file that the slot has (template of read_universe_settings). Each new video of the universe starts with the intro, ends with the outro and shows the watermark; a vertical video with no vertical clip uses the horizontal one, and a video that exists keeps the template that it was made with. Free. Keep requestId after a lost reply.

slugrequired
text, at most 200 characters
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
slotrequired
one ofintroHorizontaloutroHorizontalintroVerticaloutroVerticalwatermarkintroHorizontal, outroHorizontal: the intro and the outro of horizontal videos. introVertical, outroVertical: of vertical videos. watermark: the watermark of each video.
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
remove_universe_template_fileWrite

Remove the intro, the outro or the watermark of one of the user's own universes, as the remove button of "Intro, outro and watermark" on the "Your universe" page does. New videos of the universe then have no such file; a video that exists keeps the template that it was made with. The answer is empty when the slot has no file of the owner. Free.

slugrequired
text, at most 200 characters
slotrequired
one ofintroHorizontaloutroHorizontalintroVerticaloutroVerticalwatermarkintroHorizontal, outroHorizontal: the intro and the outro of horizontal videos. introVertical, outroVertical: of vertical videos. watermark: the watermark of each video.

Visual styles

The look of a video: the styles in your list, a new style with its sample pictures, and changes to your own styles.

list_visual_stylesRead

List the visual styles that this account can use: the user's own (owned: true), the public ones and the styles of LongStories, each with its ID and name. Free and read-only.

read_visual_styleRead

Read one visual style that this account can use: its name, its description, its style text (stylePhrase: the words that each picture in this style is drawn with) and its pictures, each with a link that works for 1 hour. Show the pictures to the user: they show the look of the style. A picture of one of the user's own styles (owned: true) also has the pictureId that remove_visual_style_picture takes. Free and read-only.

styleIdrequired
UUID
save_visual_styleWrite

Save a public style of another user, or a style of LongStories, to the user's list (saved: true), or remove it from the list (saved: false). An own style is not saved: it is in the list already. Free.

styleIdrequired
UUID
savedrequired
true or false
write_visual_style_phraseWrite

Write the style text (stylePhrase) of a new visual style from its name and its description, as the New visual style window does. It returns text only and saves nothing: show it to the user, then give it to make_visual_style_pictures and create_visual_style. Free.

name
text, at most 200 characters
description
text, at most 2000 characters
quote_visual_style_picturesRead

Read the price of the sample pictures of a new visual style, for a count of 1 to 3 pictures. Free and read-only.

countrequired
whole number, 1 to 3
make_visual_style_picturesWrite

Draw the sample pictures of a new visual style from its style text, as the New visual style window does. Costs credits: pass credits of quote_visual_style_pictures for the same count as quotedCredits. The credits are reserved at the start, and only the pictures that are drawn are charged. Requires the user's approval over the spending limits. The call draws the pictures before it answers, which can take 2 minutes. Each picture has a pictureId and a link that works for 1 hour: show the pictures to the user, then give the pictureId of each picture that the user wants to create_visual_style. A style holds 3 pictures at most. Keep the same request ID after a lost reply; never create a new ID to recover an uncertain request.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
stylePhraserequired
text, at most 2000 characters
countrequired
whole number, 1 to 3
quotedCreditsrequired
number, 0 or more
upload_visual_style_pictureWrite

Upload a picture (file or uploadId) as a reference picture of a visual style: a PNG, JPEG, WebP or GIF of 25 MB at most, with the image check of the website. With no styleId, the picture is stored for a new style: give its pictureId to create_visual_style. With the styleId of one of the user's own styles, the picture is added to that style at once; a style holds 3 pictures at most. Free. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
styleId
UUID
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
create_visual_styleWrite

Create a visual style of the user, as Create in the New visual style window does: its name, its description, its style text (stylePhrase; write_visual_style_phrase can write it) and 1 to 3 pictures that show the look. pictureIds are the IDs that make_visual_style_pictures or upload_visual_style_picture gave. Returns the styleId: the visualStyleId that quote_video_creation and generate_video take. Free. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
namerequired
text, at most 200 characters
description
text, at most 2000 characters
stylePhrase
text, at most 2000 characters
pictureIdsrequired
list of text, at most 2000 characters, at most 3
change_visual_styleWrite

Change the name, the description or the style text (stylePhrase) of one of the user's own visual styles, as Save on the style page does. Give only the texts that change: a text that is not given stays as it is, and an empty description or stylePhrase clears it. Each picture that is drawn in this style from then on gets the new style text; a video that is made keeps its pictures. Free.

styleIdrequired
UUID
name
text, at most 200 characters
description
text, at most 2000 characters
stylePhrase
text, at most 2000 characters
remove_visual_style_pictureWrite

Remove one picture from one of the user's own visual styles, as the remove button of the style page does. pictureId is the ID that read_visual_style gave. The last picture of a style stays. The picture does not come back: call it only when the user asked to remove this exact picture. Free.

styleIdrequired
UUID
pictureIdrequired
text, at most 2000 characters
archive_visual_styleWrite

Archive one of the user's own visual styles, as Archive on the style page does: it goes out of the lists. Videos made with it stay. Call it only when the user asked to archive this exact style: name it first. Free.

styleIdrequired
UUID

Saved scripts

The drafts of your script library. A change to a draft does not change a video that is made. Free.

list_scriptsRead

List saved scripts owned by this account, including video scripts and separate drafts.

limit
whole number, 1 to 50. Default: 12
cursor
text or null. Default: null
archived
true or false. Default: false
read_scriptRead

Read the full text and revision of an owned saved script. Video scripts are read-only here; current video edits use Cards and Shots.

scriptIdrequired
UUID
copy_video_script_to_draftWrite

Save the supplied video script as a separate editable draft. Keeps the original video intact. Use requestId to recover a lost reply.

projectIdrequired
UUID
requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
scriptrequired
text, at most 100000 characters
save_script_draftWrite

Save a separate script draft at its exact revision. This does not change an existing video's Cards, Shots or media.

scriptIdrequired
UUID
scriptrequired
text, at most 100000 characters
expectedUpdatedAtrequired
text
set_script_archivedWrite

Archive or restore a separate script draft. Video scripts cannot be archived through this action.

scriptIdrequired
UUID
archivedrequired
true or false
expectedUpdatedAtrequired
text

Files

A file from your computer, a narration or a song for a new video, and the files that you uploaded before.

start_file_uploadRead

Step 1 of 2 to use a file that is on the user's computer, for an app that can run a command there and has no attachment for the tool. Give the exact size of the file in bytes (for example `stat -c %s <path>` on Linux, `stat -f %z <path>` on macOS): an image of 25 MiB at most, audio of 128 MiB at most, a video of 20 MiB at most (an intro or an outro of a universe). The reply has an uploadId and an address for one PUT into the user's private storage, for 15 minutes. Send the file with the command of the reply's 'curl' field, with the path of the file in place of <path>. A 2xx answer means the bytes are there; 403 means a wrong size or header, or an old address; 412 means a file is already there for this uploadId. Then give uploadId to the upload tool (upload_shot_image, upload_shot_reference_picture, create_characters_from_image, create_saved_element, upload_visual_style_picture, upload_universe_picture, upload_universe_template_file, upload_audio, upload_music_track) in place of file. That tool applies the same checks as for an attachment and then deletes the staged bytes. Free. When you cannot run a command on the user's computer, do not start an upload: ask the user for a public link, or to upload the file on https://longstories.ai.

kindrequired
one ofimageaudiovideo
fileNamerequired
text, at most 100 charactersThe name of the file, with its extension.
sizeBytesrequired
whole numberThe exact size of the file in bytes: the address takes this size only.
upload_audioWrite

Upload narration or a song for video creation, from file or uploadId. Uses the same audio format, duration and plan checks as the Create page. Returns an owned audioId for generation. Keep requestId after a lost reply.

requestIdrequired
UUIDKeep this ID after a lost reply. Use a new ID only for a new user-requested operation.
kindrequired
one ofnarrationsong
file
objectA file that the user attached in the app, or a direct public HTTPS link to the file: { download_url: <link>, file_id: <any text> }.
uploadId
UUIDA file on the user's computer: the uploadId of start_file_upload, after the PUT of the file.
list_media_libraryRead

List owned image assets or uploaded audio. Use image asset IDs for references/import and creationReady audio IDs for narration or song creation. If audio is not creationReady, upload it with upload_audio first. Private storage keys are not returned.

kindrequired
one ofimageaudio
offset
whole number, 0 or more. Default: 0
limit
whole number, 1 to 24. Default: 12
projectId
UUID

Are you an AI agent? See this page as Markdown