PixMind Docs
API Guides

Video to storyboard prompts

Extract scene descriptions and generation prompts from a video.

Reuse POST /api-platform/v1/video-to-prompt with a public videoUrl, optional language (default zh-cn) and maxScenes (integer 1–100). Alternatively send one videoFile in multipart/form-data. Videos are limited to 30 minutes. The existing service bills per 30-second block, rounded up, using the configured API price returned by GET /tools; older per-minute wording is superseded.

curl 'https://aihub-admin.aimix.pro/api-platform/v1/video-to-prompt' \
  -H "Authorization: Bearer $PIXMIND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"videoUrl":"https://example.com/input.mp4","language":"en","maxScenes":10}'
const response = await fetch("https://aihub-admin.aimix.pro/api-platform/v1/video-to-prompt", {
  method: "POST", headers: {Authorization: `Bearer ${process.env.PIXMIND_API_KEY}`, "Content-Type": "application/json"},
  body: JSON.stringify({videoUrl: "https://example.com/input.mp4", language: "en", maxScenes: 10})
});
const created = await response.json();
if (!response.ok || created.code !== 1000) throw new Error(created.message);
console.log(created.data.taskId);
import os, requests
response = requests.post("https://aihub-admin.aimix.pro/api-platform/v1/video-to-prompt",
    headers={"Authorization": "Bearer " + os.environ["PIXMIND_API_KEY"]},
    json={"videoUrl": "https://example.com/input.mp4", "language": "en", "maxScenes": 10}, timeout=120)
response.raise_for_status()
created = response.json()
if created["code"] != 1000: raise RuntimeError(created["message"])
print(created["data"]["taskId"])

Query GET /api-platform/v1/tasks/{taskId}. status:"ready" includes the existing structured storyboard in result; status:"failed" includes errorMessage. The Playground displays the full JSON with copy/download controls. Keep the returned schema intact so scene descriptions, master prompts and any scene-level prompts remain available. See async tasks and temporary uploads.

The existing submit endpoint does not implement the new cleanup/TTS idempotency protocol. Submit once, retain the task ID and poll it; do not automatically repeat a paid submit after an uncertain response.