Skip to main content
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"
}
'
{
"data": {
"id": "run_abc123",
"projectId": "proj_123abc"
},
"requestId": "req_123abc"
}

Base URL

https://longstories.ai/api/v1

Check Styles, Music, Captions…

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.

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.

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.

voiceoverConfig
object

Enables and customizes an AI voiceover for the generated script content.

captionsConfig
object

Controls visual styling and position of text captions derived from the voiceover.

effectsConfig
object

Controls visual transitions and animations applied between scenes. 'Random' picks a dynamic effect per scene.

musicConfig
object

Specifies a background music track and how it should be mixed with voiceover.

videoConfig
object

Configures video generation for each scene using an image-to-video model.

templateConfig
object

Internal use only - Template configuration for LongStories branding.

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.

requestId
string

Unique identifier associated with the request for debugging/tracking.