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
| Parameter | Type | Required | Description |
|---|---|---|---|
| notifyHook | string | No | Callback URL; if empty, use global notifyHook |
| state | string | No | Custom passthrough parameter for callback or task metadata |
| prompt | string | No | Video generation prompt (optional) |
| image | string | Yes | First-frame image, provide url or base64; can be omitted when extending an existing task |
| action | string | No | Expansion action type; when provided, index and taskId are required to specify the child task |
| taskId | string | No | Original task ID to operate on |
| index | integer | No | Frame/branch index for expanded video (0-3) |
| noStorage | boolean | No | If true, return official link without persistence |
| motion | string | Yes | Motion intensity, enum: low / high |
| mode | string | No | Speed 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"
}