VidoCraft API

Quickstart

Submit your first generation task in a few minutes with a free test key.

  1. Create a Test API key in Settings → API Keys.
  2. Submit your first task with the request below (no credits needed with a test key).
  3. Poll the returned taskId until status is "completed" — about 35 seconds in the sandbox.
  4. Swap in a Live key and a real model id to generate for real.
curl https://vidocraft.com/api/v1/generations \
  -X POST \
  -H "Authorization: Bearer sk_test_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-to-image:rikcgfbufzdm",
    "input": {
      "prompt": "a lighthouse on a cliff at golden hour, cinematic",
      "aspect_ratio": "16:9"
    }
  }'

A complete submit-and-poll loop:

#!/usr/bin/env bash
set -euo pipefail
# Requires jq. KEY=sk_live_… or sk_test_…
TASK_ID=$(curl -s https://vidocraft.com/api/v1/generations \
  -X POST \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"text-to-image:rikcgfbufzdm","input":{"prompt":"a lighthouse on a cliff"}}' \
  | jq -r .taskId)

while true; do
  sleep 1
  STATUS=$(curl -s https://vidocraft.com/api/v1/tasks/$TASK_ID \
    -H "Authorization: Bearer $KEY")
  case $(echo "$STATUS" | jq -r .status) in
    completed) echo "$STATUS" | jq -r '.data.results[]'; break ;;
    failed|canceled) echo "$STATUS" | jq -r .failed_reason; exit 1 ;;
  esac
done