Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt

Use this file to discover all available pages before exploring further.

Model ID
ltx-2-pro-retake

LTX-2 Pro Retake (Video Section Edit) API Usage Guide

Overview

LTX-2 Pro Retake allows you to edit a specific section of a video by replacing audio, video, or both using AI generation. Define the section with start_time and duration. It operates synchronously and returns the edited video directly.

Key Features:

  • Synchronous Operation: Results returned directly
  • Flexible Editing: Replace audio only, video only, or both
  • Section-Based: Edit specific time ranges within a video
  • Max Input: 4K resolution, 21 seconds duration

Authentication

All API requests require authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Submit Request

Endpoint

POST /api/v1/ie/requestqueue/apikey/requests

Request Format

curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ltx-2-pro-retake",
    "payload": {
      "video_uri": "https://example.com/input.mp4",
      "start_time": 0,
      "duration": 5,
      "prompt": "A dramatic explosion with bright orange flames",
      "mode": "replace_audio_and_video"
    }
  }'

Request Parameters

ParameterTypeRequiredDescriptionDefaultConstraints
video_uristringYesInput video URL for editing.-Max 4K, max 21 seconds
start_timefloatYesStart time of the section to edit, in seconds.0Min 0
durationfloatYesDuration of the section to edit, in seconds.5Min 2 seconds
promptstringNoText description of what should happen in the edited section.--
modeenumNoWhat to replace.replace_audio_and_videoreplace_audio_and_video, replace_audio, replace_video

Response

{
  "request_id": "abc123",
  "model": "ltx-2-pro-retake",
  "status": "success",
  "created_at": 1761763441,
  "updated_at": 1761763481
}

Check Request Status

Endpoint

GET /api/v1/ie/requestqueue/apikey/requests/{request_id}

Example

curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/{request_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "request_id": "abc123",
  "model": "ltx-2-pro-retake",
  "status": "success",
  "payload": {
    "video_uri": "https://example.com/input.mp4",
    "start_time": 0,
    "duration": 5,
    "prompt": "A dramatic explosion with bright orange flames",
    "mode": "replace_audio_and_video"
  },
  "outcome": {
    "media_urls": [
      {
        "id": "0",
        "url": "https://storage.googleapis.com/.../video.mp4"
      }
    ]
  },
  "created_at": 1761763441,
  "updated_at": 1761763481,
  "queued_at": 1761763441
}

Request Status Values

StatusDescription
queuedRequest is waiting to be processed
processingVideo generation is in progress
successVideo generation completed successfully
failedVideo generation failed
cancelledRequest was cancelled

List Your Requests

Endpoint

GET /api/v1/ie/requestqueue/apikey/requests?model_id=ltx-2-pro-retake

Get Model Information

Endpoint

GET /api/v1/ie/requestqueue/apikey/models/ltx-2-pro-retake

Edit Modes

ModeDescription
replace_audio_and_videoReplace both the audio and video tracks (default)
replace_audioReplace only the audio track, keep original video
replace_videoReplace only the video track, keep original audio

Specifications

SpecificationValue
Modelltx-2-pro
Max input resolution4K (3840x2160)
Max input duration21 seconds
Min edit duration2 seconds