Skip to content

Tool Jobs API

The Tool Jobs API lets you queue common video edits through POST /v1/tools/{toolId}/jobs, poll for completion, and download the result. It is the server-side equivalent of the browser tools at https://ilovevideoeditor.com/tools/{toolId}.

Base URLs

EnvironmentURL
Productionhttps://api.ilovevideoeditor.com

Authentication

Tool jobs accept the same authentication as the rest of the API:

  • API keyx-api-key: YOUR_API_KEY
  • Bearer tokenAuthorization: Bearer <jwt>

API keys are created in the dashboard under Account > API Keys. Bearer tokens are used by the dashboard and authenticated studio routes.

Queue a tool job

bash
curl -X POST https://api.ilovevideoeditor.com/v1/tools/trim-video/jobs \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "inputUrl": "https://cdn.example.com/video.mp4",
    "config": {
      "startTime": 2,
      "endTime": 8
    },
    "webhookUrl": "https://your-app.com/webhooks/ilovevideoeditor"
  }'

Request body

FieldTypeRequiredDescription
inputUrlstring (URL)yesPublic URL of the source video. blob: and file: URLs are rejected.
configobjectyesTool-specific configuration. Each tool accepts a different set of fields; see the Full OpenAPI Reference for schemas.
webhookUrlstring (URL)noURL called when the job completes or fails.
durationnumbernoSource duration in seconds. When omitted, the server probes the source.
dimensions{ width, height }noSource display dimensions. When omitted, the server probes the source.

Response

json
{
  "jobId": "018f...",
  "status": "processing",
  "stage": "processing",
  "mode": "native"
}
FieldDescription
jobIdUUID of the queued job. Use it for polling and download.
statusprocessing, rendering, completed, failed, etc.
stageHuman-readable stage mapped from the pipeline status.
modenative for simple ffmpeg/MediaBunny jobs, render for full VideoJSON rendering.

Poll for status

bash
curl https://api.ilovevideoeditor.com/v1/tools/jobs/018f... \
  -H "x-api-key: YOUR_API_KEY"

Response while processing:

json
{
  "jobId": "018f...",
  "status": "rendering",
  "stage": "rendering",
  "mode": "render",
  "progress": {
    "done": 12,
    "total": 30,
    "percent": 40
  }
}

Response when completed:

json
{
  "jobId": "018f...",
  "status": "completed",
  "stage": "completed",
  "mode": "native",
  "progress": {
    "done": 1,
    "total": 1,
    "percent": 100
  },
  "url": "https://cdn.ilovevideoeditor.com/tools/018f.../output.mp4",
  "outputs": [
    {
      "provider": "r2",
      "outputKey": "tools/018f.../output.mp4",
      "outputUrl": "https://cdn.ilovevideoeditor.com/tools/018f.../output.mp4",
      "outputSizeBytes": 1234567
    }
  ]
}
FieldDescription
status / stageCurrent job state.
modenative or render.
progressOptional render progress with done, total, and percent.
urlSigned download URL when status is completed.
outputsArray of output destinations with size information.
errorError message when status is failed.

Download the result

bash
curl -L https://api.ilovevideoeditor.com/v1/tools/jobs/018f.../download \
  -H "x-api-key: YOUR_API_KEY" \
  -o output.mp4

The endpoint returns a 302 redirect to a signed download URL. The download is metered against your workspace bandwidth.

Webhooks

If you provide webhookUrl when queueing, the server sends a POST request there when the job finishes:

json
{
  "id": "018f...",
  "status": "completed",
  "progress": 100,
  "url": "https://cdn.ilovevideoeditor.com/tools/018f.../output.mp4",
  "error": null,
  "createdAt": "2025-01-01T00:00:00.000Z",
  "completedAt": "2025-01-01T00:00:12.000Z"
}

Possible status values in the webhook are pending, rendering, completed, and failed. Treat the webhook as a notification and always verify the job state with GET /v1/tools/jobs/{id} if the request is untrusted.

Tool modes and pricing

  • Native (mode: "native") — simple tools run directly through ffmpeg/MediaBunny. Cost is a flat 0.01 credits per job.
  • Render (mode: "render") — studio tools compile to a full VideoJSON scene. Cost is calculated with the standard render cost formula based on duration, resolution, and framerate.

The server chooses the mode automatically. For example, add-border uses the native path for square corners but switches to the render path when borderRadius > 0.

Error handling

StatusMeaningWhat to do
400Invalid request body or unsupported local URL.Check the details field and the tool config shape.
402Insufficient credits.Purchase credits or reduce job complexity.
404Tool not found or job not accessible.Verify the toolId and job ownership.
429Too many active jobs.Wait for an existing job to finish before queueing another.
502Worker or render pipeline submission failed.Retry with exponential backoff; contact support if it persists.

Example: crop a video

bash
curl -X POST https://api.ilovevideoeditor.com/v1/tools/crop-video/jobs \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "inputUrl": "https://cdn.example.com/video.mp4",
    "config": {
      "cropTop": 0.1,
      "cropBottom": 0.1,
      "cropLeft": 0,
      "cropRight": 0
    }
  }'

Example: add text overlay

bash
curl -X POST https://api.ilovevideoeditor.com/v1/tools/add-text/jobs \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "inputUrl": "https://cdn.example.com/video.mp4",
    "config": {
      "text": "Hello world",
      "fontSize": 64,
      "color": "#ffffff",
      "positionX": 0.5,
      "positionY": 0.9
    }
  }'

See also

Released under the MIT License.