### Text-to-Video Generation Response Example Source: https://videogenapi.com/docs This is an example of a JSON response received after submitting a text-to-video generation request. It indicates the request was successful and provides details about the generation job. ```json { "success": true, "generation_id": "gen_686717fe97bd3_055867", "request_id": "24076931-9c23-4d18-a1d4-9d5cb5369c62", "status": "pending", "type": "text-to-video", "model": { "key": "kling_25", "name": "Kling 2.5", "provider": "Kuaishou" }, "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "style": "realistic", "fps": 30, "aspect_ratio": "16:9", "seed": 42, "status_url": "/v1/status/gen_686717fe97bd3_055867", "message": "Video generation request submitted successfully.", "usage": { "current_month_usage": 1, "monthly_limit": 100 } } ``` -------------------------------- ### Text-to-Video Generation (cURL) Source: https://videogenapi.com/docs Use this cURL request to generate a video from a text prompt. Ensure you replace YOUR_API_KEY with your actual API key. The model 'kling_25' is used in this example. ```bash curl -X POST "https://videogenapi.com/api/v1/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling_25", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9", "seed": 42 }' ``` -------------------------------- ### Veo 3.1 Multi-Image Generation (2 Images, cURL) Source: https://videogenapi.com/docs This cURL example shows Veo 3.1 using the FIRST_AND_LAST_FRAMES_2_VIDEO mode with two reference images. The 'veo3_fast' model is specified. ```bash curl -X POST "https://videogenapi.com/api/v1/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "veo-31", "prompt": "The scene transitions smoothly from day to night", "reference_image_urls": [ "https://example.com/day.jpg", "https://example.com/night.jpg" ], "aspect_ratio": "16:9", "veo_model": "veo3_fast" }' ``` -------------------------------- ### Completed Video Generation Status Response Example Source: https://videogenapi.com/docs This JSON response indicates that a video generation request has been completed successfully. It includes the video URL and other details about the completed generation. ```json { "success": true, "generation_id": "gen_686717fe97bd3_055867", "status": "completed", "type": "text-to-video", "model": { "key": "kling_25", "name": "Kling 2.5", "provider": "Kuaishou" }, "video_url": "https://videogenapi.com/api/v1/video/gen_686717fe97bd3_055867", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "style": "realistic", "fps": 30, "aspect_ratio": "16:9", "processing_time": 764, "completed_at": "2025-01-04 00:08:42", "seed": 622177285 } ``` -------------------------------- ### Initialize Video Generation API Client Source: https://videogenapi.com/docs Instantiate the VideoGenAPI client with your API key. This client is used to make requests to the API for video generation. ```javascript class videogenAPI { constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = 'https://videogenapi.com/api/v1'; } async generateTextToVideo(prompt, options = {}) { const data = { model: 'higgsfield', prompt, duration: 5, resolution: '720p', aspect_ratio: '16:9', ...options }; return await this.makeRequest('/generate', 'POST', data); } async generateImageToVideo(prompt, imageUrl, options = {}) { const data = { model: 'kling_2_1', prompt, image_url: imageUrl, duration: 5, resolution: '720p', camera_fixed: false, ...options }; return await this.makeRequest('/generate', 'POST', data); } // Additional methods... } ``` -------------------------------- ### Image-to-Video Generation (cURL) Source: https://videogenapi.com/docs This cURL request demonstrates image-to-video generation. Provide a source image URL and a text prompt. The 'veo_3' model is used here, with camera fixed set to false. ```bash curl -X POST "https://videogenapi.com/api/v1/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "veo_3", "prompt": "The dog runs in the park chasing a butterfly", "image_url": "https://example.com/images/my-dog.jpg", "duration": 15, "resolution": "4K", "camera_fixed": false, "seed": 123456 }' ``` -------------------------------- ### Image-to-Video Generation Request (Single Image) Source: https://videogenapi.com/docs Submit a video generation request using both 'prompt' and 'image_url' parameters for Image-to-Video mode. Ensure you include the Authorization header. ```python import requests api_key = "YOUR_API_KEY" base_url = "https://videogenapi.com/api/v1" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } payload = { "prompt": "A majestic dragon flying over a medieval castle.", "image_url": "https://example.com/images/dragon_castle.jpg", "model": "Kling 3", # Optional: Specify the AI model "add_audio": False } response = requests.post(f"{base_url}/generate", headers=headers, json=payload) if response.status_code == 200: print("Video generation request successful:") print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Veo 3.1 Multi-Image Generation (3+ Images, cURL) Source: https://videogenapi.com/docs For Veo 3.1, using 3 or more reference images triggers REFERENCE_2_VIDEO mode. This automatically enforces the 'veo3_fast' model and '16:9' aspect ratio, ignoring any specified 'veo_model' or 'aspect_ratio' parameters. ```bash curl -X POST "https://videogenapi.com/api/v1/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "veo-31", "prompt": "A stylized animation of a character walking", "reference_image_urls": [ "https://example.com/ref1.jpg", "https://example.com/ref2.jpg", "https://example.com/ref3.jpg" ] }' ``` -------------------------------- ### Image-to-Video Generation Request (Multiple Images) Source: https://videogenapi.com/docs Submit a video generation request using 'prompt' and 'reference_image_urls' for multi-image Image-to-Video mode. This mode is supported by models like Veo 3.1. Ensure you include the Authorization header. ```python import requests api_key = "YOUR_API_KEY" base_url = "https://videogenapi.com/api/v1" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } payload = { "prompt": "A sequence showing a flower blooming and then wilting.", "reference_image_urls": [ "https://example.com/images/flower_start.jpg", "https://example.com/images/flower_middle.jpg", "https://example.com/images/flower_end.jpg" ], "model": "Veo 3.1 Fast", # Example model supporting multi-image "add_audio": True, "audio_prompt": "Gentle nature sounds" } response = requests.post(f"{base_url}/generate", headers=headers, json=payload) if response.status_code == 200: print("Video generation request successful:") print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### User Information Request (cURL) Source: https://videogenapi.com/docs Use this cURL command to fetch your user information and usage statistics. Remember to replace YOUR_API_KEY with your actual API key. ```bash curl -X GET "https://videogenapi.com/api/v1/user" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Text-to-Video Generation with Audio (cURL) Source: https://videogenapi.com/docs Use this cURL request to generate a video from text, with an option to include audio. Ensure you replace YOUR_API_KEY with your actual API key. ```bash curl -X POST "https://videogenapi.com/api/v1/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling_25", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9", "add_audio": true, "audio_prompt": "Cheerful ambient sounds with soft nature background" }' ``` -------------------------------- ### Request Video Generation with Audio Enhancement Source: https://videogenapi.com/docs Submit a video generation request including `add_audio: true` to enable automatic audio enhancement. An optional `audio_prompt` can be provided for custom guidance. ```json { "model": "kling_25", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "add_audio": true, "audio_prompt": "cheerful ambient sounds with soft nature background" } ``` -------------------------------- ### Text-to-Video Generation Request Source: https://videogenapi.com/docs Submit a video generation request using only the 'prompt' parameter for Text-to-Video mode. Ensure you include the Authorization header. ```python import requests api_key = "YOUR_API_KEY" base_url = "https://videogenapi.com/api/v1" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } payload = { "prompt": "A futuristic cityscape at sunset, with flying cars and neon lights.", "model": "Sora 2", # Optional: Specify the AI model "add_audio": True, # Optional: Add AI-generated audio "audio_prompt": "Synthwave music with ambient city sounds" } response = requests.post(f"{base_url}/generate", headers=headers, json=payload) if response.status_code == 200: print("Video generation request successful:") print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Text-to-Video Generation with Audio Enhancement Source: https://videogenapi.com/docs Generates a video from a text prompt and optionally enhances it with audio. This endpoint supports specifying model, duration, resolution, aspect ratio, and audio prompts. ```APIDOC ## POST /api/v1/generate ### Description Generates a video from a text prompt, with options for audio enhancement. ### Method POST ### Endpoint /api/v1/generate ### Parameters #### Request Body - **model** (string) - Required - The model to use for generation (e.g., "kling_25"). - **prompt** (string) - Required - The text prompt describing the desired video content. - **duration** (integer) - Optional - The desired duration of the video in seconds (default: 5). - **resolution** (string) - Optional - The desired resolution of the video (e.g., "1080p", "720p"). - **aspect_ratio** (string) - Optional - The desired aspect ratio of the video (e.g., "16:9"). - **add_audio** (boolean) - Optional - Whether to add audio to the video. - **audio_prompt** (string) - Optional - A prompt to guide the audio generation. ### Request Example ```json { "model": "kling_25", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9", "add_audio": true, "audio_prompt": "Cheerful ambient sounds with soft nature background" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **generation_id** (string) - Unique identifier for the generation request. - **request_id** (string) - Unique identifier for the request. - **status** (string) - Current status of the generation (e.g., "pending"). - **type** (string) - The type of generation (e.g., "text-to-video"). - **model** (object) - Information about the model used. - **prompt** (string) - The prompt used for generation. - **duration** (integer) - The duration of the video. - **resolution** (string) - The resolution of the video. - **style** (string) - The style of the video. - **fps** (integer) - Frames per second of the video. - **aspect_ratio** (string) - The aspect ratio of the video. - **seed** (integer) - The seed used for generation. - **status_url** (string) - URL to check the status of the generation. - **message** (string) - A message related to the request. - **usage** (object) - Information about API usage. #### Response Example ```json { "success": true, "generation_id": "gen_686717fe97bd3_055867", "request_id": "24076931-9c23-4d18-a1d4-9d5cb5369c62", "status": "pending", "type": "text-to-video", "model": { "key": "kling_25", "name": "Kling 2.5", "provider": "Kuaishou" }, "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "style": "realistic", "fps": 30, "aspect_ratio": "16:9", "seed": 42, "status_url": "/v1/status/gen_686717fe97bd3_055867", "message": "Video generation request submitted successfully.", "usage": { "current_month_usage": 1, "monthly_limit": 100 } } ``` ``` -------------------------------- ### Image-to-Video Generation Source: https://videogenapi.com/docs Generate a video from a source image and a text prompt. This mode activates image-to-video generation. ```APIDOC ## POST /api/v1/generate ### Description Generates a video from a source image and a text prompt, activating image-to-video mode. ### Method POST ### Endpoint /api/v1/generate ### Parameters #### Query Parameters - **model** (string) - Optional - AI model to use (sora-2, higgsfield_v1, kling-3, veo3, veo-31, seedance-2, nanobanana-video, ltxv-2, ltxv-13b, veo2, wan-25). Default: sora-2 - **prompt** (string) - Required - Text description of the video (max 1000 characters) - **image_url** (string) - Optional - Source image URL (jpg, jpeg, png, gif, webp). If provided, activates image-to-video mode (single image). - **duration** (integer) - Optional - Duration in seconds (varies by model: 5-60s). Default: 5 - **resolution** (string) - Optional - Video resolution (480p, 720p, 1080p, 4K - varies by model). Default: 720p - **camera_fixed** (boolean) - Optional - Whether to fix the camera position. Default: false - **seed** (integer) - Optional - Random seed to control generation (-1 for random). Default: random ### Request Example ```json { "model": "veo_3", "prompt": "The dog runs in the park chasing a butterfly", "image_url": "https://example.com/images/my-dog.jpg", "duration": 15, "resolution": "4K", "camera_fixed": false, "seed": 123456 } ``` ``` -------------------------------- ### PHP Video Generation API Client Source: https://videogenapi.com/docs A PHP class for interacting with the Video Generation API. It includes methods for generating text-to-video and image-to-video content, as well as checking generation status. The `makeRequest` method requires implementation. ```php apiKey = $apiKey; } public function generateTextToVideo($prompt, $options = []) { $data = array_merge([ 'model' => 'higgsfield', 'prompt' => $prompt, 'duration' => 5, 'resolution' => '720p', 'aspect_ratio' => '16:9' ], $options); return $this->makeRequest('/generate', 'POST', $data); } public function generateImageToVideo($prompt, $imageUrl, $options = []) { $data = array_merge([ 'model' => 'kling_2_1', 'prompt' => $prompt, 'image_url' => $imageUrl, 'duration' => 5, 'resolution' => '720p', 'camera_fixed' => false ], $options); return $this->makeRequest('/generate', 'POST', $data); } public function getStatus($generationId) { return $this->makeRequest('/status/' . $generationId); } private function makeRequest($endpoint, $method = 'GET', $data = null) { // Implementation details... } } // Usage examples... ?> ``` -------------------------------- ### Generate Video from Text Source: https://videogenapi.com/docs Generates a video from a text prompt using the specified model. Supports various options for duration, resolution, and aspect ratio. ```APIDOC ## POST /generate ### Description Generates a video from a text prompt. ### Method POST ### Endpoint /generate ### Parameters #### Request Body - **model** (string) - Required - The model to use for generation (e.g., 'higgsfield'). - **prompt** (string) - Required - The text prompt to generate the video from. - **duration** (integer) - Optional - The duration of the video in seconds (default: 5). - **resolution** (string) - Optional - The resolution of the video (e.g., '720p', default: '720p'). - **aspect_ratio** (string) - Optional - The aspect ratio of the video (e.g., '16:9', default: '16:9'). - **add_audio** (boolean) - Optional - Enable automatic audio enhancement (default: false). - **audio_prompt** (string) - Optional - Custom guidance for audio generation. ### Request Example ```json { "model": "higgsfield", "prompt": "A futuristic cityscape at sunset", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9", "add_audio": true, "audio_prompt": "epic cinematic music" } ``` ### Response #### Success Response (200) - **video_url** (string) - URL to the generated video. - **generation_id** (string) - Unique identifier for the generation process. ``` -------------------------------- ### Text-to-Video Generation Source: https://videogenapi.com/docs Generate a video from a text prompt using a specified AI model. You can customize duration, resolution, aspect ratio, and seed for controlled generation. ```APIDOC ## POST /api/v1/generate ### Description Generates a video from a text prompt. ### Method POST ### Endpoint /api/v1/generate ### Parameters #### Query Parameters - **model** (string) - Optional - AI model to use (sora-2, higgsfield_v1, kling-3, veo3, veo-31, seedance-2, nanobanana-video, ltxv-2, ltxv-13b, veo2, wan-25). Default: sora-2 - **prompt** (string) - Required - Text description of the video (max 1000 characters) - **duration** (integer) - Optional - Duration in seconds (varies by model: 5-60s). Default: 5 - **resolution** (string) - Optional - Video resolution (480p, 720p, 1080p, 4K - varies by model). Default: 720p - **aspect_ratio** (string) - Optional - Aspect ratio (16:9, 4:3, 1:1, 9:21). Only for text-to-video mode. Default: 16:9 - **seed** (integer) - Optional - Random seed to control generation (-1 for random). Default: random - **camera_fixed** (boolean) - Optional - Whether to fix the camera position. Default: false - **add_audio** (boolean) - Optional - Add AI-generated sound effects synchronized with video. Default: false - **audio_prompt** (string) - Optional - Guide audio generation with custom description. ### Request Example ```json { "model": "kling_25", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9", "seed": 42 } ``` ``` -------------------------------- ### Generate Video from Image Source: https://videogenapi.com/docs Generates a video from a provided image URL and a text prompt. Supports various options for duration, resolution, and camera settings. ```APIDOC ## POST /generate (Image to Video) ### Description Generates a video from an image URL and a text prompt. ### Method POST ### Endpoint /generate ### Parameters #### Request Body - **model** (string) - Required - The model to use for generation (e.g., 'kling_2_1'). - **prompt** (string) - Required - The text prompt describing the desired video content. - **image_url** (string) - Required - The URL of the image to use as a base. - **duration** (integer) - Optional - The duration of the video in seconds (default: 5). - **resolution** (string) - Optional - The resolution of the video (e.g., '720p', default: '720p'). - **camera_fixed** (boolean) - Optional - Whether the camera should be fixed (default: false). - **add_audio** (boolean) - Optional - Enable automatic audio enhancement (default: false). - **audio_prompt** (string) - Optional - Custom guidance for audio generation. ### Request Example ```json { "model": "kling_2_1", "prompt": "A majestic dragon flying over mountains", "image_url": "https://example.com/image.jpg", "duration": 7, "resolution": "1080p", "camera_fixed": true, "add_audio": true, "audio_prompt": "epic orchestral score" } ``` ### Response #### Success Response (200) - **video_url** (string) - URL to the generated video. - **generation_id** (string) - Unique identifier for the generation process. ``` -------------------------------- ### List Generations Request (cURL) Source: https://videogenapi.com/docs This cURL command retrieves a list of your past video generation requests. You can specify the page number and the number of results per page. Replace YOUR_API_KEY with your actual API key. ```bash curl -X GET "https://videogenapi.com/api/v1/generations?page=1&limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Check Video Generation Status (cURL) Source: https://videogenapi.com/docs Use this cURL command to check the status of a specific video generation request using its generation ID. Replace YOUR_API_KEY with your actual API key. ```bash curl -X GET "https://videogenapi.com/api/v1/status/gen_686717fe97bd3_055867" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Generate Video Source: https://videogenapi.com/docs Submit a video generation request from a text description (text-to-video) or from an image + text (image-to-video). The API automatically detects the generation mode based on provided parameters. ```APIDOC ## POST /v1/generate ### Description Submit a video generation request from a text description (text-to-video) or from an image + text (image-to-video). #### Automatic Mode Detection The API automatically detects the generation mode based on parameters: * **Text-to-Video:** When only the `prompt` parameter is provided * **Image-to-Video:** When both `prompt` and `image_url` parameters are provided (single image) * **Image-to-Video (Multi-image):** When `prompt` and `reference_image_urls` are provided (1-5 images). Supported by Veo 3.1 and other models that support reference-to-video #### Parameters ##### Request Body - **prompt** (string) - Required - The text description for video generation. - **image_url** (string) - Optional - URL of a single image for image-to-video generation. - **reference_image_urls** (array of strings) - Optional - URLs of reference images (1-5) for multi-image image-to-video generation. - **model** (string) - Optional - Specifies the AI model to use for generation. Defaults to the best available model. - **add_audio** (boolean) - Optional - If true, enhances the video with AI-generated sound effects. - **audio_prompt** (string) - Optional - Customizes the AI-generated sound effects when `add_audio` is true. ### Request Example ```json { "prompt": "A futuristic cityscape at sunset", "model": "Sora 2", "add_audio": true, "audio_prompt": "ambient city sounds" } ``` ### Response #### Success Response (200) - **video_url** (string) - URL of the generated video. - **status** (string) - Status of the generation request (e.g., 'processing', 'completed'). #### Response Example ```json { "video_url": "https://videogenapi.com/videos/generated_video.mp4", "status": "completed" } ``` ``` -------------------------------- ### Veo 3.1 Multi-Image Reference Source: https://videogenapi.com/docs Utilize Veo 3.1 with multiple reference images for advanced video generation modes. Supports FIRST_AND_LAST_FRAMES_2_VIDEO and REFERENCE_2_VIDEO modes based on the number of images provided. ```APIDOC ## POST /api/v1/generate ### Description Generates a video using Veo 3.1 with multiple reference images. Supports FIRST_AND_LAST_FRAMES_2_VIDEO (1-2 images) and REFERENCE_2_VIDEO (3+ images) modes. ### Method POST ### Endpoint /api/v1/generate ### Parameters #### Query Parameters - **model** (string) - Optional - AI model to use. For 3+ reference images, this will be overridden to `veo3_fast`. Default: sora-2 - **prompt** (string) - Required - Text description of the video (max 1000 characters) - **reference_image_urls** (array) - Optional - Array of image URLs (1-5 images). For Veo 3.1: 1-2 images uses FIRST_AND_LAST_FRAMES_2_VIDEO mode, 3+ images uses REFERENCE_2_VIDEO mode (forces veo3_fast and 16:9). - **aspect_ratio** (string) - Optional - Aspect ratio (16:9, 4:3, 1:1, 9:21). For 3+ reference images, this will be overridden to `16:9`. - **veo_model** (string) - Optional - Specific Veo model to use. Ignored if `reference_image_urls` has 3+ images. ### Request Example - Veo 3.1 with 2 images ```json { "model": "veo-31", "prompt": "The scene transitions smoothly from day to night", "reference_image_urls": [ "https://example.com/day.jpg", "https://example.com/night.jpg" ], "aspect_ratio": "16:9", "veo_model": "veo3_fast" } ``` ### Request Example - Veo 3.1 Reference Mode (3+ images) ```json { "model": "veo-31", "prompt": "A stylized animation of a character walking", "reference_image_urls": [ "https://example.com/ref1.jpg", "https://example.com/ref2.jpg", "https://example.com/ref3.jpg" ] } ``` **Note:** With 3+ images, Veo 3.1 automatically uses REFERENCE_2_VIDEO mode, forces `veo3_fast` model, and `aspect_ratio: "16:9"`. The `veo_model` and `aspect_ratio` parameters will be ignored. ``` -------------------------------- ### List Video Generations Source: https://videogenapi.com/docs Retrieves a paginated list of all video generation requests made by the user. ```APIDOC ## GET /v1/generations ### Description Retrieves a list of your video generation requests. ### Method GET ### Endpoint /v1/generations ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **limit** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl -X GET "https://videogenapi.com/api/v1/generations?page=1&limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ``` -------------------------------- ### User Information Source: https://videogenapi.com/docs Retrieves information about the authenticated user, including usage statistics. ```APIDOC ## GET /v1/user ### Description Retrieve user information and usage statistics. ### Method GET ### Endpoint /v1/user ### Request Example ```bash curl -X GET "https://videogenapi.com/api/v1/user" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ``` -------------------------------- ### Base URL Source: https://videogenapi.com/docs All API endpoints are relative to this base URL. ```http https://videogenapi.com/api/v1/ ``` -------------------------------- ### Authentication Header Source: https://videogenapi.com/docs Include your API key in the Authorization header using Bearer token authentication for all API requests. ```http Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### AI Audio Enhancement Source: https://videogenapi.com/docs Automatically adds synchronized sound effects to your videos using the Mirelo SFX V1.5 model. This feature can be enabled by setting `add_audio` to true in the generation request. ```APIDOC ## AI Audio Enhancement ### Description Automatically adds synchronized sound effects to your videos. This feature detects video content and generates appropriate audio, or uses a custom audio prompt. ### How It Works 1. Submit a video generation request with `add_audio: true`. 2. Video is generated normally by the selected model. 3. Audio enhancement automatically begins after video generation completes. 4. AI-generated sound effects are synchronized with the video. 5. Final video with audio is returned when complete. ### Audio Enhancement Parameters - **add_audio** (boolean) - Enable automatic audio enhancement (default: false). - **audio_prompt** (string) - Optional custom guidance for audio generation. Examples: "upbeat pop music", "nature sounds with birds", "cinematic orchestral soundtrack". ### Processing Time Audio enhancement adds additional processing time after video generation. Total time will be the video generation time plus audio synthesis time (typically 10-30 seconds). The same `generation_id` is used throughout the process. ``` -------------------------------- ### Model-Specific Rate Limit Error (Sora 2) Source: https://videogenapi.com/docs/rate-limits.php This JSON response indicates that a model-specific rate limit has been exceeded. Check `seconds_until_reset` to determine when to retry. ```json { "error": "Sora-2 rate limit exceeded", "message": "The Sora-2 model is limited to 5 generations per hour for the Unlimited plan. Contact support for higher limits.", "details": { "current_usage": 10, "limit": 10, "window": "1 hour", "reset_time": "2025-10-09 15:00:00", "seconds_until_reset": 3247, "upgrade_required": true, "upgrade_plan": "Unlimited $199/month" } } ``` -------------------------------- ### Check Video Generation Status Source: https://videogenapi.com/docs Retrieves the current status of a video generation request using its unique generation ID. ```APIDOC ## GET /v1/status/{generation_id} ### Description Checks the status of a video generation request. ### Method GET ### Endpoint /v1/status/{generation_id} ### Parameters #### Path Parameters - **generation_id** (string) - Required - The unique identifier of the generation request. ### Request Example ```bash curl -X GET "https://videogenapi.com/api/v1/status/gen_686717fe97bd3_055867" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **generation_id** (string) - Unique identifier for the generation request. - **status** (string) - Current status of the generation (e.g., "completed", "pending"). - **type** (string) - The type of generation (e.g., "text-to-video"). - **model** (object) - Information about the model used. - **video_url** (string) - The URL of the generated video (if completed). - **prompt** (string) - The prompt used for generation. - **duration** (integer) - The duration of the video. - **resolution** (string) - The resolution of the video. - **style** (string) - The style of the video. - **fps** (integer) - Frames per second of the video. - **aspect_ratio** (string) - The aspect ratio of the video. - **processing_time** (integer) - The time taken for processing in seconds. - **completed_at** (string) - Timestamp when the generation was completed. - **seed** (integer) - The seed used for generation. #### Response Example (Completed) ```json { "success": true, "generation_id": "gen_686717fe97bd3_055867", "status": "completed", "type": "text-to-video", "model": { "key": "kling_25", "name": "Kling 2.5", "provider": "Kuaishou" }, "video_url": "https://videogenapi.com/api/v1/video/gen_686717fe97bd3_055867", "prompt": "A cat playing with a ball in a sunny garden", "duration": 10, "resolution": "1080p", "style": "realistic", "fps": 30, "aspect_ratio": "16:9", "processing_time": 764, "completed_at": "2025-01-04 00:08:42", "seed": 622177285 } ``` #### Possible Status Values - **pending**: Request submitted, waiting for processing. - **in_queue**: Request is in the processing queue. - **in_progress**: Video generation in progress. - **completed**: Generation completed successfully. - **failed**: Generation failed. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.