Skip to main content
POST
Note for users in mainland China: Please use https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.
  • Official-channel Grok Imagine video extend feature
  • Extend the duration of existing videos by 2-10 seconds
  • Async task management, query results via task ID

Path Parameters

string
required
Original video task IDThis is the task ID returned from a previous video generation request. The finished video of that task is used as the extension source.To extend an arbitrary video URL without a source task, use POST /v1/videos/extend and pass video_urls in the body instead of a path parameter.

Authorizations

string
required
All API requests require Bearer Token authenticationGet API Key: Visit the API Key Management Page to obtain your API KeyAdd to request headers:

Body

string
default:"grok-imagine-video-official"
required
Video extend model nameExample: "grok-imagine-video-official"
string
required
Text description for video extension
integer
default:"6"
Extension length in secondsSupported range: 2–10 seconds
string[]
Source video URL list. Required when using POST /v1/videos/extend without a task ID; optional when video_id is present in the path.Public http:///https:// URLs or platform asset:// references.
Pricing note: Extension bills the generated extension seconds plus the input source video duration per second. The input video duration is determined automatically by the platform; it does not need to be declared in the request.

Response

string
Unique task identifier for querying task status
string
Object type, always generation.task
string
Model name used
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
integer
Task progress percentage (0-100)
integer
Task creation timestamp (Unix timestamp)
object
Task metadata