Skip to content

Image Task: Image to Video (Image → Video)

Overview

  • API: POST /mj/submit/video
  • Description: Generate a short video from a first-frame image or extend an existing video task (e.g., expand movement of a specific frame).
  • Content-Type: application/json

Authentication

  • Use HTTP Bearer Token, Example: Authorization: Bearer sk-xxxxx

Request Parameters

ParameterTypeRequiredDescription
notifyHookstringNoCallback URL; if empty, use global notifyHook
statestringNoCustom passthrough parameter for callback or task metadata
promptstringNoVideo generation prompt (optional)
imagestringYesFirst-frame image, provide url or base64; can be omitted when extending an existing task
actionstringNoExpansion action type; when provided, index and taskId are required to specify the child task
taskIdstringNoOriginal task ID to operate on
indexintegerNoFrame/branch index for expanded video (0-3)
noStoragebooleanNoIf true, return official link without persistence
motionstringYesMotion intensity, enum: low / high
modestringNoSpeed mode, enum: FAST / RELAX / TURBO (Default FAST)

Recommended parameter order (priority): prompt, motion, image, action, taskId, index, state, notifyHook, noStorage, mode.


Request Example

json
{
  "prompt": "A rabbit riding a motorcycle, wheels spinning fast, high quality, no distortion",
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD...",
  "motion": "high",
  "mode": "FAST",
  "noStorage": false
}

curl

bash
curl -X POST "https://api.gpt.ge/mj/submit/video" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxx" \
  -d '{"prompt":"A rabbit riding a motorcycle, wheels spinning fast, high quality, no distortion","image":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD...","motion":"high","mode":"FAST","noStorage":false}'

JavaScript (fetch)

javascript
fetch('https://api.gpt.ge/mj/submit/video', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx' },
  body: JSON.stringify({ prompt: 'A rabbit riding a motorcycle, wheels spinning fast, high quality, no distortion', image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD...', motion: 'high', mode: 'FAST', noStorage: false })
}).then(r => r.json()).then(console.log)

Python (requests)

python
import requests

payload = {
  'prompt': '兔子像人一样开着一辆摩托车,镜头往后拉,运动轨迹合乎逻辑,高清,无瑕疵',
  'image': 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD...',
  'motion': 'high',
  'mode': 'FAST',
  'noStorage': False
}

resp = requests.post('https://api.gpt.ge/mj/submit/video', headers={'Content-Type':'application/json','Authorization':'Bearer sk-xxxx'}, json=payload)
print(resp.json())

Response Example (200)

json
{
  "code": 1,
  "description": "Submit success",
  "result": "1725017986212425"
}