How to Use the Seedance 2.5 Flash API: Three Request Modes

Seedance 2.5 Flash has three request modes in PiAPI: text generation, first/last frame guidance, and multimodal reference. This hands-on guide shows the request body for each. For release details and current prices, see the Flash overview.
Choose a mode before you write the request
text_to_video: start with a prompt when you do not need a specific source image or sound.first_last_frames: provide one starting image or two images in start-to-end order when the opening composition or transition matters.omni_reference: supply at least one image, video, or audio URL when the result should follow existing media. Setomni_reference_task_typetoreferencefor the example below;auto,edit, andextendhave different behavior.
Before you send a task
Create a PiAPI key and store it in the server-side PIAPI_API_KEY environment variable. All three examples POST to /api/v1/task with model: "seedance" and task_type: "seedance-2.5-flash". Replace the example media URLs with directly readable HTTPS files. Flash supports 480p or 720p and output durations from 4 to 30 seconds; it has no Draft Mode.
1. Generate a video from text
Use mode: "text_to_video" and a prompt. Do not include media URL arrays in this mode. This four-second 720p request is a minimal starting point:
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H "X-API-Key: $PIAPI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"seedance","task_type":"seedance-2.5-flash","input":{"mode":"text_to_video","prompt":"A slow tracking shot through a sunlit greenhouse, leaves moving in a breeze","resolution":"720p","duration":4,"aspect_ratio":"16:9"}}'2. Guide the first and last frames
Use mode: "first_last_frames" and image_urls. The first URL anchors the opening frame and the optional second URL anchors the ending frame:
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H "X-API-Key: $PIAPI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"seedance","task_type":"seedance-2.5-flash","input":{"mode":"first_last_frames","prompt":"The camera circles the product as daylight fades","image_urls":["https://example.com/first-frame.png","https://example.com/last-frame.png"],"resolution":"720p","duration":6,"aspect_ratio":"16:9"}}'Supply one or two images, not a video or audio URL. Keep the source images visually consistent with the requested aspect ratio. These URLs are placeholders; an accessible image is required for a real task.
3. Use image, video, or audio references
Use mode: "omni_reference" for multimodal guidance. The API accepts an image-only, video-only, or audio-only reference; the example combines an image and audio. Neither video_urls nor every reference type is mandatory:
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H "X-API-Key: $PIAPI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"seedance","task_type":"seedance-2.5-flash","input":{"mode":"omni_reference","omni_reference_task_type":"reference","prompt":"Use the reference image for the product design and the audio for the rhythm of a cinematic reveal","image_urls":["https://example.com/product.png"],"audio_urls":["https://example.com/score.mp3"],"resolution":"720p","duration":8,"aspect_ratio":"16:9"}}'Flash permits up to 10 images, 5 videos, and 5 audio files, with at most 30 seconds total for input videos and 30 seconds total for input audio. For editing or extending a source video, use omni_reference_task_type: "edit" or "extend", include a video URL, and set aspect_ratio: "adaptive". Edit follows the source duration (duration: -1 or omit it); extend needs an output duration from 4 to 30 seconds. See the edit and extend guide for those requests.
Get the generated video
A successful POST returns a task ID. Poll the task endpoint with that ID until the task completes, then read the output video URL. Task creation is asynchronous; do not expect the video bytes in the POST response. For production status handling, see the polling and webhooks guide.
curl -H "X-API-Key: $PIAPI_API_KEY" \
'https://api.piapi.ai/api/v1/task/YOUR_TASK_ID'Common request errors to check
- Mode and fields disagree:
text_to_videodoes not accept media arrays;first_last_framesacceptsimage_urlsbut not video or audio arrays. - Reference count or duration is too high: Flash allows 10 images, 5 videos, and 5 audio files; total input video and audio durations each have a 30-second cap.
- Unsupported output: use 480p or 720p and 4–30 seconds. A 1080p request or
draftfield is not a Flash workflow. - Media cannot be fetched: replace
example.comURLs with directly readable files and verify the URLs from the service environment. - Unexpected cost with video references: input video duration adds a charge on top of the output duration. Check the live model pricing before running batches.
Seedance 2.5 Flash API FAQ
Can I provide only a first frame?
Yes. In first_last_frames mode, send one image URL for the first frame. Send two URLs to guide both endpoints.
Does omni_reference require an image or video?
No. Seedance 2.5 accepts an audio-only reference in omni_reference mode. At least one of the image, video, or audio URL arrays must contain a reference.
Can I use 1080p or Draft Mode with Flash?
No. Flash supports 480p and 720p, and Draft Mode is unavailable. The standard Seedance 2.5 variant has a separate contract.
Continue building
Read the Seedance 2.5 API documentation for the full parameter table, then try Flash in the Seedance 2.5 playground. For pricing and release specifications, use the Flash overview.


