Skip to content

Quickstart

This guide takes you from an API key to a finished MP4 on disk. You need an account on the Agency plan and a few minutes while the video renders.

  1. Get an API key

    In the app, open Account > API keys, create a key and copy it. Then store it in an environment variable so it stays out of your code:

    Terminal window
    export REIGNITOR_API_KEY="emp_..."

    See Authentication for details.

  2. Check the key

    Call GET /v1/me. A 200 means the key works. The response also shows your credit balance.

    Terminal window
    curl https://reignitor.com/v1/me \
    -H "Authorization: Bearer $REIGNITOR_API_KEY"
    {
    "user_id": "3f1c2a9e-8b7d-4c1e-9f0a-2d6b5e4c3a21",
    "email": "dev@example.com",
    "name": "Sam",
    "credits_remaining": 42
    }
  3. Start a video

    Call POST /v1/render with a brief. Reignitor plans the scenes and starts the render. Send an Idempotency-Key with a fresh value, so a network retry cannot start the same video twice.

    Terminal window
    curl https://reignitor.com/v1/render \
    -H "Authorization: Bearer $REIGNITOR_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: $(uuidgen)" \
    -d '{
    "brief": "A 20 second advert for Northwind Coffee, a small-batch roaster. Warm, early-morning mood. End on the line: Roasted this week, at your door by Friday.",
    "kind": "ad",
    "duration_sec": 20,
    "aspect": "9:16",
    "quality": "draft"
    }'

    You get 202 Accepted and a job_id:

    {
    "job_id": "7d2e4b10-5c3a-4f8e-a1b2-9c0d8e7f6a54",
    "status": "starting",
    "title": "Northwind Coffee, at your door by Friday",
    "scenes": 4,
    "credits_used": 12,
    "watermarked": false,
    "poll_url": "/v1/job/7d2e4b10-5c3a-4f8e-a1b2-9c0d8e7f6a54",
    "note": "Render started. Poll poll_url, or subscribe to video.completed via POST /api/webhooks/hooks."
    }
  4. Wait for the job to finish

    Poll GET /v1/job/{id} every few seconds until status is succeeded, failed or cancelled. A render usually takes a few minutes.

    Terminal window
    JOB_ID="7d2e4b10-5c3a-4f8e-a1b2-9c0d8e7f6a54"
    while true; do
    JOB=$(curl -s "https://reignitor.com/v1/job/$JOB_ID" \
    -H "Authorization: Bearer $REIGNITOR_API_KEY")
    STATUS=$(echo "$JOB" | jq -r .status)
    echo "$STATUS $(echo "$JOB" | jq -r .progress)%"
    case "$STATUS" in succeeded|failed|cancelled) break ;; esac
    sleep 10
    done
    echo "$JOB"

    A finished job looks like this:

    {
    "job_id": "7d2e4b10-5c3a-4f8e-a1b2-9c0d8e7f6a54",
    "status": "succeeded",
    "progress": 100,
    "video_url": "https://cdn.example.com/exports/7d2e4b10.mp4",
    "error": null
    }

    Rather than polling, you can subscribe a webhook to video.completed.

  5. Download the video

    video_url is a direct link to the MP4. Download it and store it on your side.

    Terminal window
    curl -L -o northwind.mp4 "$(echo "$JOB" | jq -r .video_url)"
  • 401: check the key and the Bearer prefix. See Authentication.
  • 402: the account is not on the Agency plan, or is out of credits. Read code.
  • 422 BRAND_REQUIRED or NO_ANCHOR, or 400 PRESENTER_REQUIRED: the render needs a brand, a product photo or a presenter. See Making videos.
  • 429: slow down. See Limits.

Every status and code is listed in Errors.