# Seedream 5 Lite 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/seedream-api/seedream-5 ## Available Models - seedream-5-lite: 2K $0.052/image, 3K $0.052/image (flat) - seedream-5-lite-less-restriction: 2K/3K $0.065/image (relaxed content moderation, +25%) No reference-image surcharge on Lite (up to 10 reference image URLs included). ## Text to Image POST /api/v1/task { "model": "seedream", "task_type": "seedream-5-lite", "input": { "prompt": "Street photography of a busy urban road after rain", "aspect_ratio": "16:9", "size": "2K", "output_format": "png" } } Aspect ratios: 1:1 (default), 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4 Sizes: 2K (default), 3K — both cost the same Output formats: png (default), jpeg ## Image Edit (reference images) POST /api/v1/task { "model": "seedream", "task_type": "seedream-5-lite", "input": { "prompt": "Keep the scene, make the leaves brown like autumn", "image_urls": ["https://example.com/reference.jpg"], "aspect_ratio": "1:1", "size": "2K" } } Up to 10 reference image URLs; the prompt describes the edit to apply. ## Get Task Result GET /api/v1/task/{task_id} Status: "pending" → "processing" → "completed" or "failed" Image URL: response.data.output.image_urls[0] Output images are stored for 3 days — download within the storage period. ## 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 image from response.data.output.image_urls