# Seedream 5.0 Pro > Generate and precisely edit high-fidelity images from text and up to ten references, with grounded region editing and multilingual text. ## Overview - **Endpoint**: `https://api.segmind.com/v1/seedream-5-pro` - **Model ID**: `seedream-5-pro` - **Category**: Text-to-Image Generation - **Type**: Synchronous (Direct response) - **Average Cost**: $0.11155442566250974 ## Pricing | Charge | Price | | --- | --- | | Base image — 1K output (up to 2.36 MP) | $0.0534375 | | Base image — 2K output (over 2.36 MP) | $0.106875 | | Each additional reference image | $0.0035625 | ## API Information This model uses a **synchronous response pattern**: 1. Make a POST request with your parameters 2. Receive the output directly in the response (binary for images/videos/audio, JSON for text) 3. No polling required - response is immediate ### Input Schema The API accepts the following input parameters: - **`prompt`** (`string`, _required_): Prompt Text describing the image subject, style and setting. Be specific and name lighting and mood; put on-image text in quotes to render it exactly. - **`image_input`** (`array`, _optional_): Image input list Reference image URLs for image-to-image or multi-reference editing, up to 10. Add product or character refs to preserve identity; leave empty for pure text-to-image. - Item type: string - **`aspect_ratio`** (`string | null`, _optional_): Aspect ratio Width-to-height ratio of the output. Use 1:1 for social, 16:9 or 21:9 for banners, 9:16 for mobile, 3:4 for portraits. - Default: `"3:2"` - Options: "1:1" (1:1), "4:3" (4:3), "3:4" (3:4), "16:9" (16:9), "9:16" (9:16), "3:2" (3:2), "2:3" (2:3), "21:9" (21:9) - **`size`** (`string | null`, _optional_): Size Output resolution tier. Use 1K for fast drafts and iteration, 2K for print-ready detail and crisp small text. - Default: `"2K"` - Options: "1K" (1K), "2K" (2K) - **`output_format`** (`string | null`, _optional_): Output format File format of the returned image. Use jpeg for smaller photographic files, png for transparency and lossless text or edges. - Default: `"jpeg"` - Options: "jpeg" (jpeg), "png" (png) - **`watermark`** (`boolean | null`, _optional_): Watermark Toggles a visible watermark on the output. Keep false for clean production assets; set true only when attribution is required. - Default: `false` **Required Parameters Example**: ```json { "prompt": "A hyper-detailed macro photograph of a hummingbird hovering beside a dew-covered red hibiscus flower at sunrise, iridescent emerald and sapphire feathers catching warm golden light, tiny water droplets sparkling, soft creamy bokeh background, ultra sharp focus, professional wildlife photography" } ``` **Full Example**: ```json { "prompt": "A hyper-detailed macro photograph of a hummingbird hovering beside a dew-covered red hibiscus flower at sunrise, iridescent emerald and sapphire feathers catching warm golden light, tiny water droplets sparkling, soft creamy bokeh background, ultra sharp focus, professional wildlife photography", "image_input": [], "aspect_ratio": "3:2", "size": "2K", "output_format": "jpeg", "watermark": false } ``` ### Output Schema The API returns a synchronous response based on the model type: **For Image/Video/Audio Models**: - Response contains binary data (image/png, video/mp4, audio/mp3) - Content-Type header indicates the media type - Save the response body directly to a file **For Text Models**: - Response is JSON with the generated text - Structure varies by model **HTTP Response Codes**: - **200 - OK**: Request successful, output in response body - **400 - Bad Request**: Invalid parameters - **401 - Unauthorized**: Invalid or missing API key - **404 - Not Found**: Model not found - **406 - Not Acceptable**: Insufficient credits - **429 - Too Many Requests**: Rate limit exceeded - **500 - Server Error**: Internal server error ## Usage Examples ### cURL ```bash curl -X POST "https://api.segmind.com/v1/seedream-5-pro" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A hyper-detailed macro photograph of a hummingbird hovering beside a dew-covered red hibiscus flower at sunrise, iridescent emerald and sapphire feathers catching warm golden light, tiny water droplets sparkling, soft creamy bokeh background, ultra sharp focus, professional wildlife photography", "image_input": [], "aspect_ratio": "3:2", "size": "2K", "output_format": "jpeg", "watermark": false }' ``` ### Python ```python import requests import json api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/seedream-5-pro" data = { "prompt": "A hyper-detailed macro photograph of a hummingbird hovering beside a dew-covered red hibiscus flower at sunrise, iridescent emerald and sapphire feathers catching warm golden light, tiny water droplets sparkling, soft creamy bokeh background, ultra sharp focus, professional wildlife photography", "image_input": [], "aspect_ratio": "3:2", "size": "2K", "output_format": "jpeg", "watermark": false } response = requests.post( url, json=data, headers={ 'x-api-key': api_key, 'Content-Type': 'application/json' } ) if response.status_code == 200: # For image/video/audio models, response.content contains the binary data with open('output.png', 'wb') as f: f.write(response.content) print('Generation complete, saved to output.png') else: print(f"Error: {response.status_code}") print(response.text) ``` ### JavaScript ```javascript const apiKey = 'YOUR_API_KEY'; const url = 'https://api.segmind.com/v1/seedream-5-pro'; const data = { "prompt": "A hyper-detailed macro photograph of a hummingbird hovering beside a dew-covered red hibiscus flower at sunrise, iridescent emerald and sapphire feathers catching warm golden light, tiny water droplets sparkling, soft creamy bokeh background, ultra sharp focus, professional wildlife photography", "image_input": [], "aspect_ratio": "3:2", "size": "2K", "output_format": "jpeg", "watermark": false }; const response = await fetch(url, { method: 'POST', headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json', }, body: JSON.stringify(data), }); if (response.ok) { // For image/video/audio models, response contains binary data const blob = await response.blob(); const downloadUrl = URL.createObjectURL(blob); // Create download link const a = document.createElement('a'); a.href = downloadUrl; a.download = 'output.png'; a.click(); console.log('Generation complete'); } ``` ## Additional Resources ### Documentation - [Model Playground](https://www.segmind.com/models/seedream-5-pro) - [API Documentation](https://www.segmind.com/models/seedream-5-pro/api) - [Pricing Details](https://www.segmind.com/models/seedream-5-pro/pricing) - [Platform Documentation](https://docs.segmind.com/) ### Tags No tags available