Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.
POST
/
short
Create a Video
curl --request POST \ --url https://longstories.ai/api/v1/short \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "prompt": "Tell a heartwarming story about a small bakery that becomes the heart of its community", "shortRequestEnhancer": false, "directorNotes": "Warm, cozy lighting with focus on people interacting in the bakery", "scriptConfig": { "style": "default", "targetLengthInWords": 70 }, "imageConfig": { "model": "flux_schnell" }, "voiceoverConfig": { "enabled": true, "voiceId": "zWDA589rUKXuLnPRDtAG" }, "captionsConfig": { "captionsEnabled": true, "captionsStyle": "tiktok" }, "effectsConfig": { "transition": "fade", "floating": true }, "musicConfig": { "musicSlug": "gentle_ambient_loop", "enabled": true, "volume": 0.3, "loop": true }, "videoConfig": { "enabled": false, "model": "luma_ray2" }, "templateConfig": { "templateId": "none" }, "quality": "medium", "aspectRatio": "9:16"}'
import requests
url = "https://longstories.ai/api/v1/short"
payload = {
"prompt": "Tell a heartwarming story about a small bakery that becomes the heart of its community",
"shortRequestEnhancer": False,
"directorNotes": "Warm, cozy lighting with focus on people interacting in the bakery",
"scriptConfig": {
"style": "default",
"targetLengthInWords": 70
},
"imageConfig": { "model": "flux_schnell" },
"voiceoverConfig": {
"enabled": True,
"voiceId": "zWDA589rUKXuLnPRDtAG"
},
"captionsConfig": {
"captionsEnabled": True,
"captionsStyle": "tiktok"
},
"effectsConfig": {
"transition": "fade",
"floating": True
},
"musicConfig": {
"musicSlug": "gentle_ambient_loop",
"enabled": True,
"volume": 0.3,
"loop": True
},
"videoConfig": {
"enabled": False,
"model": "luma_ray2"
},
"templateConfig": { "templateId": "none" },
"quality": "medium",
"aspectRatio": "9:16"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'Tell a heartwarming story about a small bakery that becomes the heart of its community',
shortRequestEnhancer: false,
directorNotes: 'Warm, cozy lighting with focus on people interacting in the bakery',
scriptConfig: {style: 'default', targetLengthInWords: 70},
imageConfig: {model: 'flux_schnell'},
voiceoverConfig: {enabled: true, voiceId: 'zWDA589rUKXuLnPRDtAG'},
captionsConfig: {captionsEnabled: true, captionsStyle: 'tiktok'},
effectsConfig: {transition: 'fade', floating: true},
musicConfig: {musicSlug: 'gentle_ambient_loop', enabled: true, volume: 0.3, loop: true},
videoConfig: {enabled: false, model: 'luma_ray2'},
templateConfig: {templateId: 'none'},
quality: 'medium',
aspectRatio: '9:16'
})
};
fetch('https://longstories.ai/api/v1/short', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
You can check the styles, music, captions, effects, and other parameters you have available for your video generation at longstories.ai/resources.Note: Despite the endpoint being named /short, this API supports generating videos up to 10 minutes in length.
Authorizations
x-api-key
string
header
required
Your API key for authenticating requests. Example: 'x-api-key: MY_SECRET_KEY'
Body
application/json
Parameters used to initiate video creation. Provide at least one of prompt or script.
Option 1
Option 2
prompt
string
required
A textual description of what you want your video to depict or explain. Used to generate the script, scenes, and voiceover. MUTUALLY EXCLUSIVE with 'script' field - only provide one of 'prompt' or 'script'.
script
string
A fully-written script to skip AI script generation. MUTUALLY EXCLUSIVE with 'prompt' field - only provide one of 'prompt' or 'script'.
scriptConfig
object
Choose in which Style the script is written, and how long it should be. Only works if script is not provided. See this page for more information.
Show child attributes
directorNotes
string
Prompt for the image generation engine. Example: 'Warm lighting' or 'Make the first image very impactful'
shortRequestEnhancer
boolean
default:false
Experimental: if true, we choose a better framework for you and add Director Notes if necessary. It doesn't overwrite your settings.
imageConfig
object
Parameters for still-image generation used as video backgrounds or scenes.
Show child attributes
voiceoverConfig
object
Enables and customizes an AI voiceover for the generated script content.
Show child attributes
captionsConfig
object
Controls visual styling and position of text captions derived from the voiceover.
Show child attributes
effectsConfig
object
Controls visual transitions and animations applied between scenes. 'Random' picks a dynamic effect per scene.
Show child attributes
musicConfig
object
Specifies a background music track and how it should be mixed with voiceover.
Show child attributes
videoConfig
object
Configures video generation for each scene using an image-to-video model.
Show child attributes
templateConfig
object
Internal use only - Template configuration for LongStories branding.
Show child attributes
quality
enum<string>
default:medium
Video resolution & encoding quality. Higher quality takes longer to render and results in a larger file size. Note: Different quality levels will have different costs in the future, but currently only affect file size and visual quality.
Available options:
high,
medium,
low
aspectRatio
enum<string>
default:9:16
Video aspect ratio - vertical (9:16) or horizontal (16:9)
Available options:
9:16,
16:9
Response
Creation request accepted. Returns a generation Run ID used to fetch status or results later.
Generic success envelope containing data and a request identifier.
data
object
required
Return value for a newly created short generation run. Use these values to check progress.
Show child attributes
requestId
string
Unique identifier associated with the request for debugging/tracking.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"LongStories.ai","colors":{"primary":"#E01F4F","light":"#E01F4F","dark":"#E01F4F"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/longstoriesai/u4DcopSImoBfyI8S/logo/longstories-api-logo-light.svg?fit=max\u0026auto=format\u0026n=u4DcopSImoBfyI8S\u0026q=85\u0026s=d3df2a6457d535a790e9ee1f38d8dd2c","dark":"https://mintcdn.com/longstoriesai/u4DcopSImoBfyI8S/logo/longstories-api-logo-dark.svg?fit=max\u0026auto=format\u0026n=u4DcopSImoBfyI8S\u0026q=85\u0026s=82ef77c7dcb42bb881df47a57cb7a1bf"},"api":{"openapi":"openapi.json"},"navbar":{"links":[{"label":"Support","href":"mailto:uri@longstories.ai"}],"primary":{"type":"button","label":"Dashboard","href":"https://longstories.ai/dashboard"}},"footer":{"socials":{"discord":"https://discord.gg/longstories"}},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.gg/longstories","icon":"discord"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"longstoriesai","hasAudioNarration":false,"actualSubdomain":"longstoriesai","customDomains":["docs.longstories.ai"],"gitSource":{"type":"github","owner":"urirbcode","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9245bc5f2fcf249014509:success","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Documentation","count":4},{"language":"default","tag":"API Reference","count":2},{"language":"default","tag":"Getting Started","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"generate-a-short-video","slug":"/generate-a-short-video","pageMetadata":{"title":"Generate a Video","openapi":"POST /short","description":"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.","href":"/generate-a-short-video"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`base-url`,children:`Base URL`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`https://longstories.ai/api/v1`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`check-styles-music-captions…`,children:`Check Styles, Music, Captions…`}),`\n`,_jsxs(_components.p,{children:[`You can check the styles, music, captions, effects, and other parameters you have available for your video generation at `,_jsx(_components.a,{href:`https://longstories.ai/resources`,children:`longstories.ai/resources`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note:`}),` Despite the endpoint being named `,_jsx(_components.code,{children:`/short`}),`, this API supports generating videos up to 10 minutes in length.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate a Video","openapi":"POST /short","description":"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.","href":"/generate-a-short-video"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Base URL","slug":"base-url","depth":2,"children":[]},{"title":"Check Styles, Music, Captions…","slug":"check-styles-music-captions…","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create a Video","description":"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.","operationId":"createShortVideo","security":["dde07522-05ca-4626-ba24-f3983ac9ee04"],"requestBody":"62edabc3-2dc1-4e0a-8b81-65ffe6d12265","responses":{"200":"71cb312f-c768-4680-98aa-e442c587b944","400":"b58031f5-ff3b-4fd2-a464-c341dbde3421","401":"f989c934-f2c6-4779-985a-45b805b25edf","402":"2f2bbec7-ceb5-42f6-857f-18f60ed5639f","429":"aed0c1f0-8903-4814-9db5-e500ae3c523e","500":"9d929428-0ba0-41cd-ad78-a4207890ac78"},"method":"post","type":"path","servers":["a6960ce1-4d16-4624-a4bc-89123b01e7e7"],"path":"/short","baseUrlOptions":["https://longstories.ai/api/v1"],"title":"Create a Video","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"Parameters used to initiate video creation. Provide at least one of `prompt` or `script`.","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"A textual description of what you want your video to depict or explain. Used to generate the script, scenes, and voiceover. MUTUALLY EXCLUSIVE with 'script' field - only provide one of 'prompt' or 'script'.","isRequired":true,"uniqueKey":"oneOf.0.prompt","typeLabel":"string"},"script":{"type":"string","description":"A fully-written script to skip AI script generation. MUTUALLY EXCLUSIVE with 'prompt' field - only provide one of 'prompt' or 'script'.","uniqueKey":"oneOf.0.script","typeLabel":"string"},"scriptConfig":{"type":"object","description":"Choose in which Style the script is written, and how long it should be. Only works if `script` is not provided. See [this page](https://longstories.ai/resources/script-styles) for more information.","properties":{"style":{"type":"string","enum":["default","no_style","engaging_conversational","dixit_biography","kind_biography","hero_journey","emotional_story","dramatic_reveal","heartwarming_stories","educational_history","news_brief"],"default":"default","description":"Sets the tone \u0026 voice of the generated script. Examples: 'storytelling' for narrative or 'educational' for facts/instructional tone.","uniqueKey":"oneOf.0.scriptConfig.style","typeLabel":"enum\u003cstring>"},"targetLengthInWords":{"type":"integer","default":70,"minimum":1,"maximum":1500,"description":"Approx. word length of the script. The actual length may vary slightly.","uniqueKey":"oneOf.0.scriptConfig.targetLengthInWords","typeLabel":"integer"}},"uniqueKey":"oneOf.0.scriptConfig","typeLabel":"object"},"directorNotes":{"type":"string","description":"Prompt for the image generation engine. Example: 'Warm lighting' or 'Make the first image very impactful'","uniqueKey":"oneOf.0.directorNotes","typeLabel":"string"},"shortRequestEnhancer":{"type":"boolean","description":"Experimental: if true, we choose a better framework for you and add Director Notes if necessary. It doesn't overwrite your settings.","default":false,"uniqueKey":"oneOf.0.shortRequestEnhancer","typeLabel":"boolean"},"imageConfig":{"type":"object","description":"Parameters for still-image generation used as video backgrounds or scenes.","properties":{"model":{"type":"string","enum":["flux_schnell","imagen4_fast","flux_pro","flux_pro_ultra","recraft","flux_lora","sdxl","sdxl_lora","bytedance_seedream_v3","sd35_large","sd35_medium","sd35_large_turbo","leonardo_flux_precision","leonardo_phoenix_quality","reve-v1","leonardo_phoenix_ultra","hidream_fast","hidream_dev","hidream_full","midjourney","gpt_image_1","imagen4_preview"],"default":"flux_schnell","description":"Which image generation model to use. Different models can produce different artistic or realistic styles.","uniqueKey":"oneOf.0.imageConfig.model","typeLabel":"enum\u003cstring>"},"recraftStyle":{"type":"string","enum":["any","realistic_image","digital_illustration","realistic_image/b_and_w","realistic_image/hard_flash","realistic_image/hdr","realistic_image/natural_light","realistic_image/studio_portrait","realistic_image/enterprise","realistic_image/motion_blur","digital_illustration/pixel_art","digital_illustration/hand_drawn","digital_illustration/grain","digital_illustration/infantile_sketch","digital_illustration/2d_art_poster","digital_illustration/handmade_3d","digital_illustration/hand_drawn_outline","digital_illustration/engraving_color","digital_illustration/2d_art_poster_2"],"description":"If using the 'recraft' model, you can choose a preset style. Ignored if `model` is not 'recraft'.","uniqueKey":"oneOf.0.imageConfig.recraftStyle","typeLabel":"enum\u003cstring>"},"loraConfig":{"type":"object","description":"Will only be applied if `model` is 'flux_lora' or 'sdxl_lora'. Allows more specialized styles.","properties":{"loraSlug":{"type":"string","enum":["ghibsky-comic-book","colour-sketches","sketch-paint","90s-anime","2000s-crime-thrillers","xno-symbol-flux"],"description":"Identifier or slug for the LoRA to apply. See possible slugs on [LoRA styles](https://longstories.ai/resources/lora-styles) for more information.","uniqueKey":"oneOf.0.imageConfig.loraConfig.loraSlug","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.imageConfig.loraConfig","typeLabel":"object"},"leonardoStyle":{"type":"string","enum":["NONE","THREE_D_RENDER","ACRYLIC","ANIME_GENERAL","BOKEH","CINEMATIC","CINEMATIC_CONCEPT","CREATIVE","DYNAMIC","FASHION","GAME_CONCEPT","GRAPHIC_DESIGN_3D","GRAPHIC_DESIGN_POP_ART","GRAPHIC_DESIGN_VECTOR","HDR","ILLUSTRATION","MACRO","MINIMALIST","MOODY","PORTRAIT","PORTRAIT_CINEMATIC","PRO_BW_PHOTOGRAPHY","PRO_COLOR_PHOTOGRAPHY","PRO_FILM_PHOTOGRAPHY","PORTRAIT_FASHION","RAY_TRACED","SKETCH_BW","SKETCH_COLOR","STOCK_PHOTO","VIBRANT","WATERCOLOR"],"default":"NONE","description":"Optional style preset for Leonardo models (leonardo_flux_precision, leonardo_phoenix_quality, leonardo_phoenix_ultra). Ignored for other models. Provide the style name (e.g., \"CINEMATIC\"). Compatibility varies per Leonardo model (e.g., ACRYLIC is Flux-only, BOKEH is Phoenix-only). Check model compatibility before use.","uniqueKey":"oneOf.0.imageConfig.leonardoStyle","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.imageConfig","typeLabel":"object"},"voiceoverConfig":{"type":"object","description":"Enables and customizes an AI voiceover for the generated script content.","properties":{"enabled":{"type":"boolean","default":true,"description":"If false, no voiceover is produced. The final video will be music-only (if `musicConfig.enabled`) or silent.","uniqueKey":"oneOf.0.voiceoverConfig.enabled","typeLabel":"boolean"},"voiceId":{"type":"string","default":"zWDA589rUKXuLnPRDtAG","description":"Which voice model to use from the AI voice library. E.g., 'zWDA589rUKXuLnPRDtAG' is a US male voice. Find all the available voices on [this page](https://longstories.ai/resources/voices).","uniqueKey":"oneOf.0.voiceoverConfig.voiceId","typeLabel":"string"}},"uniqueKey":"oneOf.0.voiceoverConfig","typeLabel":"object"},"captionsConfig":{"type":"object","description":"Controls visual styling and position of text captions derived from the voiceover.","properties":{"captionsEnabled":{"type":"boolean","default":true,"description":"If true, on-screen text captions are displayed following the voiceover text.","uniqueKey":"oneOf.0.captionsConfig.captionsEnabled","typeLabel":"boolean"},"captionsStyle":{"type":"string","enum":["default","minimal","neon","cinematic","fancy","tiktok","highlight","gradient","intellectual","vida","manuscripts","subtitle","modern","bounce","popcorn","typewriter","handwritten","karaoke","retro","gaming"],"default":"default","description":"How the captions appear visually (font, color, styling). See [this page](https://longstories.ai/resources/captions-styles) to see examples.","uniqueKey":"oneOf.0.captionsConfig.captionsStyle","typeLabel":"enum\u003cstring>"},"captionsPosition":{"type":"string","enum":["top","center","bottom"],"default":"bottom","description":"Where to place the captions in the video.","uniqueKey":"oneOf.0.captionsConfig.captionsPosition","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.captionsConfig","typeLabel":"object"},"effectsConfig":{"type":"object","description":"Controls visual transitions and animations applied between scenes. 'Random' picks a dynamic effect per scene.","properties":{"transition":{"type":"string","enum":["none","fade","slide","wipe","flip","zoom-in","zoom-out","sway-in","SpinClockwise","SpinCounterClockwise","SpinBoomerang","PendulumLeft","PendulumRight","TrainLeft","TrainRight","FallLeft","FallRight","FallDown","RiseUp","RiseLeft","RiseRight","RiseDown","Random"],"default":"fade","description":"Visual transition/effect type used for each scene. 'Random' picks a dynamic effect per scene.","uniqueKey":"oneOf.0.effectsConfig.transition","typeLabel":"enum\u003cstring>"},"floating":{"type":"boolean","default":true,"description":"If true, images in each scene gently float or zoom, adding dynamic movement.","uniqueKey":"oneOf.0.effectsConfig.floating","typeLabel":"boolean"}},"uniqueKey":"oneOf.0.effectsConfig","typeLabel":"object"},"musicConfig":{"type":"object","description":"Specifies a background music track and how it should be mixed with voiceover.","properties":{"enabled":{"type":"boolean","default":false,"description":"If true, a background music track is included behind the voiceover.","uniqueKey":"oneOf.0.musicConfig.enabled","typeLabel":"boolean"},"musicSlug":{"type":"string","enum":["","temple_of_treasures","gentle_ambient_loop","serene_ambience","soothing_ambience","soothing_ambient_backdrop","tranquil_ambience","cozy_ambience","dreamscape","belonging_resonance","vivid_memories","cinematic_intro","cinematic_teaser","dramatic_cinematic_score","thriller_cinema_trailer","fractured_paintings","promise_of_tomorrow","spooky_orchestral_theme","light_upbeat_melody","puzzle_time","stomping_drums_rhythm","stomps_and_claps_rhythm_track","news_theme","news_report_theme","adventurous_intro","burlesque_sweetheart","highway_nocturne_national_sweetheart","haptic_sensation","heart_strings_palace","sada_trio","mozart_piano_concerto_no23","wind_on_our_side","shadows_in_the_sun","native_dreamscape","holly_woods_legend","sky_king_theme","cloud_gentle_ambience","majestic_requiem","contemplative_ambient_intro","quirky_slacker_theme"],"default":"","description":"The internal identifier of the music track. Must match a known track on the server. You can listen to all the songs on [this page](https://longstories.ai/resources/music-tracks).","uniqueKey":"oneOf.0.musicConfig.musicSlug","typeLabel":"enum\u003cstring>"},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.3,"description":"Relative loudness of the music track compared to the voiceover. 0 = silent, 1 = full.","uniqueKey":"oneOf.0.musicConfig.volume","typeLabel":"number"},"loop":{"type":"boolean","default":true,"description":"Whether the background track automatically loops when it ends.","uniqueKey":"oneOf.0.musicConfig.loop","typeLabel":"boolean"}},"uniqueKey":"oneOf.0.musicConfig","typeLabel":"object"},"videoConfig":{"type":"object","description":"Configures video generation for each scene using an image-to-video model.","properties":{"enabled":{"type":"boolean","default":false,"description":"If true, attempts to generate a video clip for each scene instead of just using the static image (longer render times, higher cost).","uniqueKey":"oneOf.0.videoConfig.enabled","typeLabel":"boolean"},"model":{"type":"string","enum":["ltx_video_13b_distilled","ltx_video","seedance_480p_5s","stable_video","motion","seedance_480p_10s","seedance_720p_5s","kling_v1_6_std_5s","kling_v2_1_std_5s","ltx_video_13b_dev","seedance_720p_10s","skyreels","vidu","kling_v1_6_std_10s","kling_v2_1_std_10s","kling_v2_1_pro_5s","luma_ray2","kling_pro_5s","minimax","wan_i2v","motion_2","kling_v2_1_pro_10s","wan_pro","luma_ray2_hd","kling_pro_10s","kling_v2_1_master_5s","kling_v2_master_5s","kling_v2_1_master_10s","veo2","kling_v2_master_10s"],"default":"luma_ray2","description":"Which image-to-video model to use. Affects style, quality, duration limits, and cost. See [Video Models](https://longstories.ai/resources/video-models) for details.","uniqueKey":"oneOf.0.videoConfig.model","typeLabel":"enum\u003cstring>"},"videoDirectorNotes":{"oneOf":[{"type":"string","description":"Optional notes specific to the video generation model, potentially influencing motion or style. Ignored by some models.","uniqueKey":"oneOf.0.videoConfig.videoDirectorNotes.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional notes specific to the video generation model, potentially influencing motion or style. Ignored by some models.","uniqueKey":"oneOf.0.videoConfig.videoDirectorNotes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.videoConfig.videoDirectorNotes","typeLabel":"string | null"},"duration":{"oneOf":[{"type":"number","description":"Target duration in seconds for the generated video clip. Some models have fixed durations. Optional.","uniqueKey":"oneOf.0.videoConfig.duration.oneOf.0","typeLabel":"number"},{"type":"null","description":"Target duration in seconds for the generated video clip. Some models have fixed durations. Optional.","uniqueKey":"oneOf.0.videoConfig.duration.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.videoConfig.duration","typeLabel":"number | null"}},"uniqueKey":"oneOf.0.videoConfig","typeLabel":"object"},"templateConfig":{"type":"object","properties":{"templateId":{"type":"string","enum":["none","longstories"],"default":"none","description":"Internal use only - Template identifier for video outro and other pre-sets.","uniqueKey":"oneOf.0.templateConfig.templateId","typeLabel":"enum\u003cstring>"}},"description":"Internal use only - Template configuration for LongStories branding.","uniqueKey":"oneOf.0.templateConfig","typeLabel":"object"},"quality":{"type":"string","enum":["high","medium","low"],"default":"medium","description":"Video resolution \u0026 encoding quality. Higher quality takes longer to render and results in a larger file size. Note: Different quality levels will have different costs in the future, but currently only affect file size and visual quality.","uniqueKey":"oneOf.0.quality","typeLabel":"enum\u003cstring>"},"aspectRatio":{"type":"string","enum":["9:16","16:9"],"description":"Video aspect ratio - vertical (9:16) or horizontal (16:9)","default":"9:16","uniqueKey":"oneOf.0.aspectRatio","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["script"],"properties":{"script":{"type":"string","description":"A fully-written script to skip AI script generation. MUTUALLY EXCLUSIVE with 'prompt' field - only provide one of 'prompt' or 'script'.","isRequired":true,"uniqueKey":"oneOf.1.script","typeLabel":"string"},"prompt":{"type":"string","description":"A textual description of what you want your video to depict or explain. Used to generate the script, scenes, and voiceover. MUTUALLY EXCLUSIVE with 'script' field - only provide one of 'prompt' or 'script'.","uniqueKey":"oneOf.1.prompt","typeLabel":"string"},"scriptConfig":{"type":"object","description":"Choose in which Style the script is written, and how long it should be. Only works if `script` is not provided. See [this page](https://longstories.ai/resources/script-styles) for more information.","properties":{"style":{"type":"string","enum":["default","no_style","engaging_conversational","dixit_biography","kind_biography","hero_journey","emotional_story","dramatic_reveal","heartwarming_stories","educational_history","news_brief"],"default":"default","description":"Sets the tone \u0026 voice of the generated script. Examples: 'storytelling' for narrative or 'educational' for facts/instructional tone.","uniqueKey":"oneOf.1.scriptConfig.style","typeLabel":"enum\u003cstring>"},"targetLengthInWords":{"type":"integer","default":70,"minimum":1,"maximum":1500,"description":"Approx. word length of the script. The actual length may vary slightly.","uniqueKey":"oneOf.1.scriptConfig.targetLengthInWords","typeLabel":"integer"}},"uniqueKey":"oneOf.1.scriptConfig","typeLabel":"object"},"directorNotes":{"type":"string","description":"Prompt for the image generation engine. Example: 'Warm lighting' or 'Make the first image very impactful'","uniqueKey":"oneOf.1.directorNotes","typeLabel":"string"},"shortRequestEnhancer":{"type":"boolean","description":"Experimental: if true, we choose a better framework for you and add Director Notes if necessary. It doesn't overwrite your settings.","default":false,"uniqueKey":"oneOf.1.shortRequestEnhancer","typeLabel":"boolean"},"imageConfig":{"type":"object","description":"Parameters for still-image generation used as video backgrounds or scenes.","properties":{"model":{"type":"string","enum":["flux_schnell","imagen4_fast","flux_pro","flux_pro_ultra","recraft","flux_lora","sdxl","sdxl_lora","bytedance_seedream_v3","sd35_large","sd35_medium","sd35_large_turbo","leonardo_flux_precision","leonardo_phoenix_quality","reve-v1","leonardo_phoenix_ultra","hidream_fast","hidream_dev","hidream_full","midjourney","gpt_image_1","imagen4_preview"],"default":"flux_schnell","description":"Which image generation model to use. Different models can produce different artistic or realistic styles.","uniqueKey":"oneOf.1.imageConfig.model","typeLabel":"enum\u003cstring>"},"recraftStyle":{"type":"string","enum":["any","realistic_image","digital_illustration","realistic_image/b_and_w","realistic_image/hard_flash","realistic_image/hdr","realistic_image/natural_light","realistic_image/studio_portrait","realistic_image/enterprise","realistic_image/motion_blur","digital_illustration/pixel_art","digital_illustration/hand_drawn","digital_illustration/grain","digital_illustration/infantile_sketch","digital_illustration/2d_art_poster","digital_illustration/handmade_3d","digital_illustration/hand_drawn_outline","digital_illustration/engraving_color","digital_illustration/2d_art_poster_2"],"description":"If using the 'recraft' model, you can choose a preset style. Ignored if `model` is not 'recraft'.","uniqueKey":"oneOf.1.imageConfig.recraftStyle","typeLabel":"enum\u003cstring>"},"loraConfig":{"type":"object","description":"Will only be applied if `model` is 'flux_lora' or 'sdxl_lora'. Allows more specialized styles.","properties":{"loraSlug":{"type":"string","enum":["ghibsky-comic-book","colour-sketches","sketch-paint","90s-anime","2000s-crime-thrillers","xno-symbol-flux"],"description":"Identifier or slug for the LoRA to apply. See possible slugs on [LoRA styles](https://longstories.ai/resources/lora-styles) for more information.","uniqueKey":"oneOf.1.imageConfig.loraConfig.loraSlug","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.imageConfig.loraConfig","typeLabel":"object"},"leonardoStyle":{"type":"string","enum":["NONE","THREE_D_RENDER","ACRYLIC","ANIME_GENERAL","BOKEH","CINEMATIC","CINEMATIC_CONCEPT","CREATIVE","DYNAMIC","FASHION","GAME_CONCEPT","GRAPHIC_DESIGN_3D","GRAPHIC_DESIGN_POP_ART","GRAPHIC_DESIGN_VECTOR","HDR","ILLUSTRATION","MACRO","MINIMALIST","MOODY","PORTRAIT","PORTRAIT_CINEMATIC","PRO_BW_PHOTOGRAPHY","PRO_COLOR_PHOTOGRAPHY","PRO_FILM_PHOTOGRAPHY","PORTRAIT_FASHION","RAY_TRACED","SKETCH_BW","SKETCH_COLOR","STOCK_PHOTO","VIBRANT","WATERCOLOR"],"default":"NONE","description":"Optional style preset for Leonardo models (leonardo_flux_precision, leonardo_phoenix_quality, leonardo_phoenix_ultra). Ignored for other models. Provide the style name (e.g., \"CINEMATIC\"). Compatibility varies per Leonardo model (e.g., ACRYLIC is Flux-only, BOKEH is Phoenix-only). Check model compatibility before use.","uniqueKey":"oneOf.1.imageConfig.leonardoStyle","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.imageConfig","typeLabel":"object"},"voiceoverConfig":{"type":"object","description":"Enables and customizes an AI voiceover for the generated script content.","properties":{"enabled":{"type":"boolean","default":true,"description":"If false, no voiceover is produced. The final video will be music-only (if `musicConfig.enabled`) or silent.","uniqueKey":"oneOf.1.voiceoverConfig.enabled","typeLabel":"boolean"},"voiceId":{"type":"string","default":"zWDA589rUKXuLnPRDtAG","description":"Which voice model to use from the AI voice library. E.g., 'zWDA589rUKXuLnPRDtAG' is a US male voice. Find all the available voices on [this page](https://longstories.ai/resources/voices).","uniqueKey":"oneOf.1.voiceoverConfig.voiceId","typeLabel":"string"}},"uniqueKey":"oneOf.1.voiceoverConfig","typeLabel":"object"},"captionsConfig":{"type":"object","description":"Controls visual styling and position of text captions derived from the voiceover.","properties":{"captionsEnabled":{"type":"boolean","default":true,"description":"If true, on-screen text captions are displayed following the voiceover text.","uniqueKey":"oneOf.1.captionsConfig.captionsEnabled","typeLabel":"boolean"},"captionsStyle":{"type":"string","enum":["default","minimal","neon","cinematic","fancy","tiktok","highlight","gradient","intellectual","vida","manuscripts","subtitle","modern","bounce","popcorn","typewriter","handwritten","karaoke","retro","gaming"],"default":"default","description":"How the captions appear visually (font, color, styling). See [this page](https://longstories.ai/resources/captions-styles) to see examples.","uniqueKey":"oneOf.1.captionsConfig.captionsStyle","typeLabel":"enum\u003cstring>"},"captionsPosition":{"type":"string","enum":["top","center","bottom"],"default":"bottom","description":"Where to place the captions in the video.","uniqueKey":"oneOf.1.captionsConfig.captionsPosition","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.captionsConfig","typeLabel":"object"},"effectsConfig":{"type":"object","description":"Controls visual transitions and animations applied between scenes. 'Random' picks a dynamic effect per scene.","properties":{"transition":{"type":"string","enum":["none","fade","slide","wipe","flip","zoom-in","zoom-out","sway-in","SpinClockwise","SpinCounterClockwise","SpinBoomerang","PendulumLeft","PendulumRight","TrainLeft","TrainRight","FallLeft","FallRight","FallDown","RiseUp","RiseLeft","RiseRight","RiseDown","Random"],"default":"fade","description":"Visual transition/effect type used for each scene. 'Random' picks a dynamic effect per scene.","uniqueKey":"oneOf.1.effectsConfig.transition","typeLabel":"enum\u003cstring>"},"floating":{"type":"boolean","default":true,"description":"If true, images in each scene gently float or zoom, adding dynamic movement.","uniqueKey":"oneOf.1.effectsConfig.floating","typeLabel":"boolean"}},"uniqueKey":"oneOf.1.effectsConfig","typeLabel":"object"},"musicConfig":{"type":"object","description":"Specifies a background music track and how it should be mixed with voiceover.","properties":{"enabled":{"type":"boolean","default":false,"description":"If true, a background music track is included behind the voiceover.","uniqueKey":"oneOf.1.musicConfig.enabled","typeLabel":"boolean"},"musicSlug":{"type":"string","enum":["","temple_of_treasures","gentle_ambient_loop","serene_ambience","soothing_ambience","soothing_ambient_backdrop","tranquil_ambience","cozy_ambience","dreamscape","belonging_resonance","vivid_memories","cinematic_intro","cinematic_teaser","dramatic_cinematic_score","thriller_cinema_trailer","fractured_paintings","promise_of_tomorrow","spooky_orchestral_theme","light_upbeat_melody","puzzle_time","stomping_drums_rhythm","stomps_and_claps_rhythm_track","news_theme","news_report_theme","adventurous_intro","burlesque_sweetheart","highway_nocturne_national_sweetheart","haptic_sensation","heart_strings_palace","sada_trio","mozart_piano_concerto_no23","wind_on_our_side","shadows_in_the_sun","native_dreamscape","holly_woods_legend","sky_king_theme","cloud_gentle_ambience","majestic_requiem","contemplative_ambient_intro","quirky_slacker_theme"],"default":"","description":"The internal identifier of the music track. Must match a known track on the server. You can listen to all the songs on [this page](https://longstories.ai/resources/music-tracks).","uniqueKey":"oneOf.1.musicConfig.musicSlug","typeLabel":"enum\u003cstring>"},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.3,"description":"Relative loudness of the music track compared to the voiceover. 0 = silent, 1 = full.","uniqueKey":"oneOf.1.musicConfig.volume","typeLabel":"number"},"loop":{"type":"boolean","default":true,"description":"Whether the background track automatically loops when it ends.","uniqueKey":"oneOf.1.musicConfig.loop","typeLabel":"boolean"}},"uniqueKey":"oneOf.1.musicConfig","typeLabel":"object"},"videoConfig":{"type":"object","description":"Configures video generation for each scene using an image-to-video model.","properties":{"enabled":{"type":"boolean","default":false,"description":"If true, attempts to generate a video clip for each scene instead of just using the static image (longer render times, higher cost).","uniqueKey":"oneOf.1.videoConfig.enabled","typeLabel":"boolean"},"model":{"type":"string","enum":["ltx_video_13b_distilled","ltx_video","seedance_480p_5s","stable_video","motion","seedance_480p_10s","seedance_720p_5s","kling_v1_6_std_5s","kling_v2_1_std_5s","ltx_video_13b_dev","seedance_720p_10s","skyreels","vidu","kling_v1_6_std_10s","kling_v2_1_std_10s","kling_v2_1_pro_5s","luma_ray2","kling_pro_5s","minimax","wan_i2v","motion_2","kling_v2_1_pro_10s","wan_pro","luma_ray2_hd","kling_pro_10s","kling_v2_1_master_5s","kling_v2_master_5s","kling_v2_1_master_10s","veo2","kling_v2_master_10s"],"default":"luma_ray2","description":"Which image-to-video model to use. Affects style, quality, duration limits, and cost. See [Video Models](https://longstories.ai/resources/video-models) for details.","uniqueKey":"oneOf.1.videoConfig.model","typeLabel":"enum\u003cstring>"},"videoDirectorNotes":{"oneOf":[{"type":"string","description":"Optional notes specific to the video generation model, potentially influencing motion or style. Ignored by some models.","uniqueKey":"oneOf.1.videoConfig.videoDirectorNotes.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional notes specific to the video generation model, potentially influencing motion or style. Ignored by some models.","uniqueKey":"oneOf.1.videoConfig.videoDirectorNotes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.videoConfig.videoDirectorNotes","typeLabel":"string | null"},"duration":{"oneOf":[{"type":"number","description":"Target duration in seconds for the generated video clip. Some models have fixed durations. Optional.","uniqueKey":"oneOf.1.videoConfig.duration.oneOf.0","typeLabel":"number"},{"type":"null","description":"Target duration in seconds for the generated video clip. Some models have fixed durations. Optional.","uniqueKey":"oneOf.1.videoConfig.duration.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.videoConfig.duration","typeLabel":"number | null"}},"uniqueKey":"oneOf.1.videoConfig","typeLabel":"object"},"templateConfig":{"type":"object","properties":{"templateId":{"type":"string","enum":["none","longstories"],"default":"none","description":"Internal use only - Template identifier for video outro and other pre-sets.","uniqueKey":"oneOf.1.templateConfig.templateId","typeLabel":"enum\u003cstring>"}},"description":"Internal use only - Template configuration for LongStories branding.","uniqueKey":"oneOf.1.templateConfig","typeLabel":"object"},"quality":{"type":"string","enum":["high","medium","low"],"default":"medium","description":"Video resolution \u0026 encoding quality. Higher quality takes longer to render and results in a larger file size. Note: Different quality levels will have different costs in the future, but currently only affect file size and visual quality.","uniqueKey":"oneOf.1.quality","typeLabel":"enum\u003cstring>"},"aspectRatio":{"type":"string","enum":["9:16","16:9"],"description":"Video aspect ratio - vertical (9:16) or horizontal (16:9)","default":"9:16","uniqueKey":"oneOf.1.aspectRatio","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"example":{"prompt":"Tell a heartwarming story about a small bakery that becomes the heart of its community","shortRequestEnhancer":false,"directorNotes":"Warm, cozy lighting with focus on people interacting in the bakery","scriptConfig":{"style":"default","targetLengthInWords":70},"imageConfig":{"model":"flux_schnell"},"voiceoverConfig":{"enabled":true,"voiceId":"zWDA589rUKXuLnPRDtAG"},"captionsConfig":{"captionsEnabled":true,"captionsStyle":"tiktok"},"effectsConfig":{"transition":"fade","floating":true},"musicConfig":{"musicSlug":"gentle_ambient_loop","enabled":true,"volume":0.3,"loop":true},"videoConfig":{"enabled":false,"model":"luma_ray2"},"templateConfig":{"templateId":"none"},"quality":"medium","aspectRatio":"9:16"},"examples":{"Example":{"title":"Example","value":{"prompt":"Tell a heartwarming story about a small bakery that becomes the heart of its community","shortRequestEnhancer":false,"directorNotes":"Warm, cozy lighting with focus on people interacting in the bakery","scriptConfig":{"style":"default","targetLengthInWords":70},"imageConfig":{"model":"flux_schnell"},"voiceoverConfig":{"enabled":true,"voiceId":"zWDA589rUKXuLnPRDtAG"},"captionsConfig":{"captionsEnabled":true,"captionsStyle":"tiktok"},"effectsConfig":{"transition":"fade","floating":true},"musicConfig":{"musicSlug":"gentle_ambient_loop","enabled":true,"volume":0.3,"loop":true},"videoConfig":{"enabled":false,"model":"luma_ray2"},"templateConfig":{"templateId":"none"},"quality":"medium","aspectRatio":"9:16"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"71cb312f-c768-4680-98aa-e442c587b944":{"description":"Creation request accepted. Returns a generation Run ID used to fetch status or results later.","content":{"application/json":{"schema":{"type":"object","description":"Generic success envelope containing data and a request identifier.","required":["data"],"properties":{"data":{"type":"object","description":"Return value for a newly created short generation run. Use these values to check progress.","properties":{"id":{"type":"string","description":"Unique run identifier. Append as `?runId={id}` to `GET /short` to fetch status.","uniqueKey":"data.id","typeLabel":"string"},"projectId":{"type":"string","description":"Unique identifier for the project associated with this generation.","uniqueKey":"data.projectId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier associated with the request for debugging/tracking.","uniqueKey":"requestId","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"data":{"id":"run_abc123","projectId":"proj_123abc"},"requestId":"req_123abc"},"examples":{"Example":{"title":"Example","value":{"data":{"id":"run_abc123","projectId":"proj_123abc"},"requestId":"req_123abc"}}},"exampleType":"examples"}},"exampleType":"examples"},"b58031f5-ff3b-4fd2-a464-c341dbde3421":{"description":"Invalid input or missing required fields. This could happen if neither `prompt` nor `script` was provided, or if a field type is invalid (e.g., `quality: \"ultra\"`).","content":{"application/json":{"schema":{"properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short code describing the error type (e.g., VAL_INVALID_FORMAT, AUTH_INVALID_KEY).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional diagnostic info, such as which field is invalid or how many credits are needed.","uniqueKey":"error.details","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier for debugging. Provided in logs for cross-reference.","uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"MissingPrompt":{"title":"MissingPrompt","summary":"Missing prompt or script","value":{"error":{"code":"VAL_MISSING_FIELD","message":"Either prompt or script is required","details":{}}}},"InvalidValue":{"title":"InvalidValue","summary":"Unrecognized quality parameter","value":{"error":{"code":"VAL_INVALID_FORMAT","message":"Invalid format provided","details":{"field":"quality","reason":"Must be one of: high, medium, low"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"f989c934-f2c6-4779-985a-45b805b25edf":{"description":"Unauthorized: invalid or missing API key in `x-api-key` header.","content":{"application/json":{"schema":{"properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short code describing the error type (e.g., VAL_INVALID_FORMAT, AUTH_INVALID_KEY).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional diagnostic info, such as which field is invalid or how many credits are needed.","uniqueKey":"error.details","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier for debugging. Provided in logs for cross-reference.","uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"AUTH_INVALID_KEY","message":"Invalid API key provided","requestId":"req_789ghi"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"AUTH_INVALID_KEY","message":"Invalid API key provided","requestId":"req_789ghi"}}}},"exampleType":"examples"}},"exampleType":"examples"},"2f2bbec7-ceb5-42f6-857f-18f60ed5639f":{"description":"Insufficient credits to generate the video.","content":{"application/json":{"schema":{"properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short code describing the error type (e.g., VAL_INVALID_FORMAT, AUTH_INVALID_KEY).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional diagnostic info, such as which field is invalid or how many credits are needed.","uniqueKey":"error.details","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier for debugging. Provided in logs for cross-reference.","uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"BIZ_INSUFFICIENT_CREDITS","message":"Insufficient credits to perform this operation","requestId":"req_012jkl","details":{"required":null,"available":25}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BIZ_INSUFFICIENT_CREDITS","message":"Insufficient credits to perform this operation","requestId":"req_012jkl","details":{"required":null,"available":25}}}}},"exampleType":"examples"}},"exampleType":"examples"},"aed0c1f0-8903-4814-9db5-e500ae3c523e":{"description":"Rate limit exceeded (too many requests).","content":{"application/json":{"schema":{"properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short code describing the error type (e.g., VAL_INVALID_FORMAT, AUTH_INVALID_KEY).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional diagnostic info, such as which field is invalid or how many credits are needed.","uniqueKey":"error.details","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier for debugging. Provided in logs for cross-reference.","uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"RATE_TOO_MANY_REQUESTS","message":"Too many requests, please try again later","requestId":"req_345mno","details":{"retryAfter":60}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"RATE_TOO_MANY_REQUESTS","message":"Too many requests, please try again later","requestId":"req_345mno","details":{"retryAfter":60}}}}},"exampleType":"examples"}},"exampleType":"examples"},"9d929428-0ba0-41cd-ad78-a4207890ac78":{"description":"Internal server error or unexpected error encountered during generation. Could be a rendering issue, hardware problem, or an uncaught exception.","content":{"application/json":{"schema":{"properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short code describing the error type (e.g., VAL_INVALID_FORMAT, AUTH_INVALID_KEY).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","description":"Additional diagnostic info, such as which field is invalid or how many credits are needed.","uniqueKey":"error.details","typeLabel":"object"},"requestId":{"type":"string","description":"Unique identifier for debugging. Provided in logs for cross-reference.","uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"BIZ_GENERATION_FAILED","message":"Error during video generation","requestId":"req_456def","details":{"reason":"Resource allocation failed"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BIZ_GENERATION_FAILED","message":"Error during video generation","requestId":"req_456def","details":{"reason":"Resource allocation failed"}}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"dde07522-05ca-4626-ba24-f3983ac9ee04":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authenticating requests. Example: 'x-api-key: MY_SECRET_KEY'","scopes":[]}}},"servers":{"a6960ce1-4d16-4624-a4bc-89123b01e7e7":{"url":"https://longstories.ai/api/v1","description":"Production API Server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authenticating requests. Example: 'x-api-key: MY_SECRET_KEY'","scopes":[]},"schema":{"title":"x-api-key","type":"string","description":"Your API key for authenticating requests. Example: 'x-api-key: MY_SECRET_KEY'","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"longstoriesai","siteName":"LongStories.ai","title":"Generate a Video - LongStories.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T05:51:57.345Z","originalFileLocation":"generate-a-short-video.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LongStories.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate a Video - LongStories.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LongStories.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.longstories.ai/generate-a-short-video\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://longstoriesai.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Generate+a+Video\u0026amp;description=Initiates+an+AI-assisted+video+generation+%28up+to+10+minutes%29+using+either+a+text+prompt+%28for+script+%2B+visuals%29+or+a+user-provided+script+%28to+skip+script+generat\u0026amp;theme=537df5b9f60ff7d81849a4d9\u0026amp;signature=4b95e53ef0d6c4e39707aca42547ffbe2cd90c299ecfef20ced9a8e763657ff0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate a Video - LongStories.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://longstoriesai.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Generate+a+Video\u0026amp;description=Initiates+an+AI-assisted+video+generation+%28up+to+10+minutes%29+using+either+a+text+prompt+%28for+script+%2B+visuals%29+or+a+user-provided+script+%28to+skip+script+generat\u0026amp;theme=537df5b9f60ff7d81849a4d9\u0026amp;signature=4b95e53ef0d6c4e39707aca42547ffbe2cd90c299ecfef20ced9a8e763657ff0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/longstoriesai/pB1X5OcJ0utuQWhS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LongStories.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#E01F4F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.longstories.ai/generate-a-short-video\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/generate-a-short-video.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.longstories.ai/#organization\",\"name\":\"LongStories.ai\",\"url\":\"https://docs.longstories.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/longstoriesai/u4DcopSImoBfyI8S/logo/longstories-api-logo-light.svg?fit=max\u0026auto=format\u0026n=u4DcopSImoBfyI8S\u0026q=85\u0026s=d3df2a6457d535a790e9ee1f38d8dd2c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.longstories.ai#website\",\"name\":\"LongStories.ai\",\"url\":\"https://docs.longstories.ai\",\"publisher\":{\"@id\":\"https://docs.longstories.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.longstories.ai/generate-a-short-video#webpage\",\"url\":\"https://docs.longstories.ai/generate-a-short-video\",\"name\":\"Generate a Video\",\"description\":\"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\",\"dateModified\":\"2026-01-07T05:51:57.345Z\",\"isPartOf\":{\"@id\":\"https://docs.longstories.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.longstories.ai/generate-a-short-video#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.longstories.ai/generate-a-short-video#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LongStories.ai\",\"item\":\"https://docs.longstories.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate a Video\",\"item\":\"https://docs.longstories.ai/generate-a-short-video\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.longstories.ai/generate-a-short-video#apireference\",\"headline\":\"Generate a Video\",\"name\":\"Generate a Video\",\"description\":\"Initiates an AI-assisted video generation (up to 10 minutes) using either a text prompt (for script + visuals) or a user-provided script (to skip script generation). Returns a Run ID used to query the status or results of the generation process.\",\"url\":\"https://docs.longstories.ai/generate-a-short-video\",\"mainEntityOfPage\":{\"@id\":\"https://docs.longstories.ai/generate-a-short-video#webpage\"},\"dateModified\":\"2026-01-07T05:51:57.345Z\",\"publisher\":{\"@id\":\"https://docs.longstories.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.longstories.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LongStories.ai\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"LongStories.ai\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/generate-a-short-video.md","siteName":"LongStories.ai","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.gg/longstories","icon":"discord"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","description":"Start generating videos with LongStories in minutes","href":"/quickstart"}]},{"group":"API Reference","pages":[{"title":"Generate a Video","openapi":"POST /short","href":"/generate-a-short-video"},{"title":"Get Video Status","openapi":"GET /short","description":"Retrieves the current status of a video generation run by passing in the Run ID returned from the `POST /short` endpoint. Can be polled periodically to check if the video is completed.","href":"/get-short-video-generation-status"}]}]}]},"basePath":"","title":"Generate a Video - LongStories.ai","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-_HcdDqS2.js","snippetPresets-CXnm-WO6.js","utils-Dg59J__o.js","style-to-object-BY3JEAdk.js","utils-D8TRpdk7.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-B6QaxWc5.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DeMZ-lcM.js","_Uint8Array-BjA2mcVW.js","isObject-FP1Yky1u.js","ApiExamples-cjPyMv63.js","usePlaygroundInputsStore-D7BWoaw4.js","shallow-Z1ceDNSG.js","isEqual-BObTuQrO.js","CodeSnippets-D1UZ1AE-.js","CodeSnippet-B373COAT.js","getApiPlaygroundDisplay-CfL-UuDS.js","Page-DuqezyvM.js","DynamicMarkdown-5yMTCLas.js","SectionHeading-BxT1HYfP.js","icon-DYJTTD3g.js","MethodPill-4AyycJeu.js","getPastedJson-Bp3WV6cN.js","Check2Icon-PhZu6Gry.js","axios-CsQoIw0U.js","Markdown-Dy9a8hT8.js","AssistantPageLink-87tSPwGm.js","dist-CXMB3QQU.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}