# Veo 3.1 > Transform static images into dynamic, high-quality videos with synchronized audio and precise creative control. ## Overview - **Endpoint**: `https://api.segmind.com/v1/veo-3.1` - **Model ID**: `veo-3.1` - **Category**: Image-to-Video Generation - **Type**: Synchronous (Direct response) - **Average Cost**: $2.256969696969697 ## Pricing | generate_audio | duration | cost | | --- | --- | --- | | false | 4 | 0.8 | | true | 4 | 1.6 | | false | 6 | 1.2 | | true | 6 | 2.4 | | false | 8 | 1.6 | | true | 8 | 3.2 | ## 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: - **`seed`** (`integer`, _optional_): Seed Sets a random seed for consistency. Useful for repeated generations. - **`image`** (`File (URL)`, _optional_): Image Start generation from this image. Ideal for specific starting visuals. - **`prompt`** (`string`, _required_): Prompt Describe the video content. Use clear, concise language for best results. - Default: `"A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her"` - **`duration`** (`integer`, _optional_): Duration Choose the video length: short is 4s, medium 6s, long 8s. - Default: `8` - Options: "4" (4), "6" (6), "8" (8) - **`last_frame`** (`File (URL)`, _optional_): Last frame End video with this image. Useful for specific concluding visuals. - **`resolution`** (`string`, _optional_): Resolution Set video quality: 720p for standard, 1080p for high resolution. - Default: `"1080p"` - Options: "720p" (720p), "1080p" (1080p) - **`aspect_ratio`** (`string`, _optional_): Aspect ratio Choose aspect ratio: 16:9 for landscape, 9:16 for portrait mode. - Default: `"16:9"` - Options: "16:9" (16:9), "9:16" (9:16) - **`generate_audio`** (`boolean`, _optional_): Generate audio Enable audio generation. Recommended for videos requiring sound. - Default: `true` - **`negative_prompt`** (`string`, _optional_): Negative prompt Exclude elements from video. Useful for refining details. - Default: `"no black and white, no sharp angles"` - **`reference_images`** (`array`, _optional_): Input image list Use reference images for consistency. Essential for maintaining subject style. - Item type: string **Required Parameters Example**: ```json { "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her" } ``` **Full Example**: ```json { "seed": null, "image": null, "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her", "duration": 8, "last_frame": null, "resolution": "1080p", "aspect_ratio": "16:9", "generate_audio": true, "negative_prompt": "no black and white, no sharp angles", "reference_images": [] } ``` ### 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/veo-3.1" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "seed": null, "image": null, "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her", "duration": 8, "last_frame": null, "resolution": "1080p", "aspect_ratio": "16:9", "generate_audio": true, "negative_prompt": "no black and white, no sharp angles", "reference_images": [] }' ``` ### Python ```python import requests import json api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/veo-3.1" data = { "seed": null, "image": null, "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her", "duration": 8, "last_frame": null, "resolution": "1080p", "aspect_ratio": "16:9", "generate_audio": true, "negative_prompt": "no black and white, no sharp angles", "reference_images": [] } 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/veo-3.1'; const data = { "seed": null, "image": null, "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her", "duration": 8, "last_frame": null, "resolution": "1080p", "aspect_ratio": "16:9", "generate_audio": true, "negative_prompt": "no black and white, no sharp angles", "reference_images": [] }; 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/veo-3.1) - [API Documentation](https://www.segmind.com/models/veo-3.1/api) - [Pricing Details](https://www.segmind.com/models/veo-3.1/pricing) - [Platform Documentation](https://docs.segmind.com/) ### Tags No tags available