Skip to main content
POST
/
v1
/
videos
/
generations
Grok Imagine Reference-to-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-reference-to-video",
  "prompt": "A @Image1 astronaut walking through glowing blue fog, cinematic slow motion",
  "reference_image_urls": [
    "https://example.com/ref-1.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
}
'
{
  "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-reference-to-video
required

grok-imagine-reference-to-video: Reference image to video generation

Example:

"grok-imagine-reference-to-video"

prompt
string
required

Text prompt describing the video content to generate

Notes:

  • Supports both Chinese and English
  • Use @Image1, @Image2 … to reference images
  • Maximum 4096 characters
Maximum string length: 4096
Example:

"A @Image1 astronaut walking through glowing blue fog, cinematic slow motion"

reference_image_urls
string[]
required

Reference image URL list

Notes:

  • Count: 1 - 7 images
  • Use @Image1 ~ @Image7 in prompt to reference corresponding images
Required array length: 1 - 7 elements
Example:
["https://example.com/ref-1.jpg"]
duration
integer | null

Output video duration (seconds)

Notes:

  • Range: 1 - 10
  • Defaults to 8 if not provided
Example:

8

aspect_ratio
string | null

Output video aspect ratio

Options:

  • 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16

Notes:

  • Defaults to 16:9 if not provided
Example:

"16:9"

resolution
string | null

Output video resolution

Options:

  • 480p
  • 720p

Notes:

  • Defaults to 480p if not provided
Example:

"480p"

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"