# Runway Gen 4 Turbo > Generate videos faster and cheaper with Runway Gen-4 Turbo! Create high-quality text, image, and combined video generation for rapid content creation. ## Overview - **Endpoint**: `https://api.segmind.com/v1/runway-gen4-turbo` - **Model ID**: `runway-gen4-turbo` - **Category**: Image-to-Video Generation - **Type**: Synchronous (Direct response) - **Average Cost**: $0.5 ## Pricing | duration | cost | | --- | --- | | 5 | 0.5 | | 10 | 1 | ## 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: - **`promptText`** (`string`, _required_): Prompt Text prompt to describe the desired animation effect - **`promptImage`** (`File (URL)`, _required_): Image URL of the input image to be animated. A HTTPS URL pointing to an image. Images must be JPEG, PNG, or WebP and are limited to 16MB - **`seed`** (`integer`, _optional_): Seed Seed for random generation - Range: 1 to 99999 - **`ratio`** (`string | null`, _optional_): Aspect ratio The aspect ratio of the output video. - Default: `"1280:720"` - Options: "1280:720" (1280:720), "720:1280" (720:1280), "1104:832" (1104:832), "832:1104" (832:1104), "960:960" (960:960), "1584:672" (1584:672) - **`duration`** (`integer | null`, _optional_): Duration Duration of the animation in seconds - Default: `5` - Options: "5" (5), "10" (10) **Required Parameters Example**: ```json { "promptText": "as the camera pans the Brooklyn bridge gets on fire and collapse", "promptImage": "https://segmind-inference-inputs.s3.amazonaws.com/bfeb3c8d-e9cc-4d59-bda5-626fcb20f90d-2afac9bc-68f5-4611-aa1b-d0bae2cecf3b-bc0f7ed8-c35b-4514-84f1-5a392d6e9b8a-thewaterwascold.png" } ``` **Full Example**: ```json { "promptText": "as the camera pans the Brooklyn bridge gets on fire and collapse", "promptImage": "https://segmind-inference-inputs.s3.amazonaws.com/bfeb3c8d-e9cc-4d59-bda5-626fcb20f90d-2afac9bc-68f5-4611-aa1b-d0bae2cecf3b-bc0f7ed8-c35b-4514-84f1-5a392d6e9b8a-thewaterwascold.png", "seed": 56698, "ratio": "1280:720", "duration": "5" } ``` ### 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/runway-gen4-turbo" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "promptText": "as the camera pans the Brooklyn bridge gets on fire and collapse", "promptImage": "https://segmind-inference-inputs.s3.amazonaws.com/bfeb3c8d-e9cc-4d59-bda5-626fcb20f90d-2afac9bc-68f5-4611-aa1b-d0bae2cecf3b-bc0f7ed8-c35b-4514-84f1-5a392d6e9b8a-thewaterwascold.png", "seed": 56698, "ratio": "1280:720", "duration": "5" }' ``` ### Python ```python import requests import json api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/runway-gen4-turbo" data = { "promptText": "as the camera pans the Brooklyn bridge gets on fire and collapse", "promptImage": "https://segmind-inference-inputs.s3.amazonaws.com/bfeb3c8d-e9cc-4d59-bda5-626fcb20f90d-2afac9bc-68f5-4611-aa1b-d0bae2cecf3b-bc0f7ed8-c35b-4514-84f1-5a392d6e9b8a-thewaterwascold.png", "seed": 56698, "ratio": "1280:720", "duration": "5" } 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/runway-gen4-turbo'; const data = { "promptText": "as the camera pans the Brooklyn bridge gets on fire and collapse", "promptImage": "https://segmind-inference-inputs.s3.amazonaws.com/bfeb3c8d-e9cc-4d59-bda5-626fcb20f90d-2afac9bc-68f5-4611-aa1b-d0bae2cecf3b-bc0f7ed8-c35b-4514-84f1-5a392d6e9b8a-thewaterwascold.png", "seed": 56698, "ratio": "1280:720", "duration": "5" }; 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/runway-gen4-turbo) - [API Documentation](https://www.segmind.com/models/runway-gen4-turbo/api) - [Pricing Details](https://www.segmind.com/models/runway-gen4-turbo/pricing) - [Platform Documentation](https://docs.segmind.com/) ### Tags No tags available