Skip to main content
POST
/
v1
/
videos
/
generations
Grok Imagine Edit-Video
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "grok-imagine-edit-video",
  "prompt": "Change the sky to a dramatic sunset with orange and purple clouds",
  "video_url": "https://example.com/input-video.mp4",
  "resolution": "auto"
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "video"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

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

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
default:grok-imagine-edit-video
required

grok-imagine-edit-video: Edit video based on text description

Example:

"grok-imagine-edit-video"

prompt
string
required

Text prompt describing the desired video edits

Notes:

  • Supports both Chinese and English
  • Maximum 4096 characters
  • Input video is scaled to max 854×480 pixels and truncated to 8 seconds
Maximum string length: 4096
Example:

"Change the sky to a dramatic sunset with orange and purple clouds"

video_url
string
required

Publicly accessible URL of the input video

Notes:

  • Must be a publicly accessible video URL
  • Video will be scaled to max 854×480 pixels and truncated to 8 seconds
Example:

"https://example.com/input-video.mp4"

resolution
string | null

Output video resolution

Options:

  • auto — Automatically match input resolution
  • 480p
  • 720p

Notes:

  • Defaults to auto if not provided
Example:

"auto"

Response

Task created successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-uyujaw3d"

model
string

Actual model name used

object
enum<string>

Specific task type

Available options:
video.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object

Asynchronous task information

type
enum<string>

Task output type

Available options:
video
Example:

"video"