# Seedance 2.0 API via PiAPI Base URL: https://api.piapi.ai Auth: X-API-Key header (get your key at https://piapi.ai/workspace/key) Documentation: https://piapi.ai/docs/seedance-api/seedance-2 ## Available Models (price per second of generated video) - seedance-2: 480p $0.10/s, 720p $0.20/s, 1080p $0.50/s (Pro quality, recommended) - seedance-2-fast: 480p $0.08/s, 720p $0.16/s (fastest) - seedance-2-mini: 480p $0.07/s, 720p $0.14/s (~2x faster than fast, lowest cost) - seedance-2-less-restriction: 480p $0.11/s, 720p $0.22/s, 1080p $0.55/s - seedance-2-fast-less-restriction: 480p $0.088/s, 720p $0.176/s - seedance-2-mini-less-restriction: 480p $0.077/s, 720p $0.154/s Cost formula: credits = unit_price x output_duration + (unit_price / 2) x total_input_video_duration ## Text to Video POST /api/v1/task { "model": "seedance", "task_type": "seedance-2", "input": { "prompt": "A woman sings and strums her guitar", "mode": "text_to_video", "duration": 5, "aspect_ratio": "16:9", "resolution": "720p" } } ## Generation Modes (input.mode) - text_to_video: prompt only - first_last_frames: pass 1-2 image_urls as start/end frames (aspect ratio follows the image) - omni_reference: up to 12 mixed references — image_urls (max 9), video_urls (max 9, mp4/mov), audio_urls (mp3/wav, up to 15s total); reference them in the prompt as @image1, @video1, @audio1 ## Input Parameters - prompt (string, required, max 4000 chars) - mode (string, required): text_to_video | first_last_frames | omni_reference - duration (int, 4-15, default 5) - aspect_ratio (string): 21:9 | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | auto (default 16:9) - resolution (string): 480p | 720p | 1080p (default 480p; mini defaults to 720p; 1080p only on seedance-2 tiers) - image_urls / video_urls / audio_urls (arrays, see modes above) - audio (bool, default true): generate audio track Face / real-person references: upload images to the Private Asset Library (https://piapi.ai/docs/seedance-api/private-asset), wait for status=Active, then use asset:// in the -less-restriction task types. ## Get Task Result GET /api/v1/task/{task_id} Status: "pending" -> "processing" -> "completed" or "failed" Video URL: response.data.output.video ## Quick Start 1. Get API key: https://piapi.ai/workspace/key 2. Top up: https://piapi.ai/workspace/billing 3. POST /api/v1/task 4. Poll GET /api/v1/task/{task_id} until "completed" 5. Get video from response.data.output.video