API Reference

API Documentation

Everything you need to integrate Editing Machine into your applications and workflows.

Base URL: https://api.editingmachine.comVersion: v1

Quick Start

Get up and running with the Editing Machine API in under 5 minutes. You'll need an API key from your dashboard.

1. Get your API key

Log in to your Editing Machine account and navigate to Settings → API Keys. Generate a new key and store it securely.

2. Submit your first job

Submit a short-form editing job
curl -X POST https://api.editingmachine.com/v1/jobs \
  -H "Authorization: Bearer em_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "short_form",
    "source_url": "https://storage.example.com/raw-footage.mp4",
    "brand_profile": "bp_abc123",
    "aspect_ratio": "9:16",
    "max_duration": 60
  }'

3. Check job status

Poll job status
curl https://api.editingmachine.com/v1/jobs/job_xyz789 \
  -H "Authorization: Bearer em_live_xxxxxxxxxxxx"

4. Download the result

When the job status is completed, the response includes a download_url valid for 30 days.

Authentication

All API requests require a Bearer token in the Authorization header. API keys are scoped to your account and can be revoked at any time.

Header format

Authorization header
Authorization: Bearer em_live_xxxxxxxxxxxx

Key types

em_live_*Production key. Full access to all endpoints. Credits are consumed.
em_test_*Test key. All endpoints return mock responses. No credits consumed.

Keep keys secure

Never expose API keys in client-side code, public repos, or logs. Use environment variables and server-side requests only.

Endpoints

POST/v1/jobs

Create a new editing job.

Request body

typestring*Job type: short_form, long_form, thumbnail
source_urlstring*URL of the source video or image file
brand_profilestringBrand profile ID for style consistency
stylestringEditing style preset: fast_paced, cinematic, minimal, corporate
aspect_ratiostringOutput ratio: 16:9, 9:16, 1:1, 4:5
max_durationintegerMaximum output duration in seconds
publish_toarrayPlatforms to auto-publish: youtube, youtube_shorts, tiktok, instagram_reels
webhook_urlstringURL to receive status updates
prioritystringProcessing priority: standard (default), rush

Response

201 Created
{
  "id": "job_xyz789",
  "status": "queued",
  "type": "short_form",
  "credits_estimated": 5,
  "created_at": "2026-03-25T10:30:00Z",
  "estimated_completion": "2026-03-25T22:30:00Z"
}
GET/v1/jobs/:id

Retrieve the status and details of a specific job.

200 OK — Completed job
{
  "id": "job_xyz789",
  "status": "completed",
  "type": "short_form",
  "credits_used": 5,
  "created_at": "2026-03-25T10:30:00Z",
  "completed_at": "2026-03-25T18:45:00Z",
  "output": {
    "download_url": "https://cdn.editingmachine.com/deliverables/job_xyz789.mp4",
    "duration": 47,
    "file_size_mb": 28.4,
    "expires_at": "2026-04-24T18:45:00Z"
  },
  "published": {
    "youtube_shorts": "https://youtube.com/shorts/abc123",
    "tiktok": "https://tiktok.com/@brand/video/456"
  }
}
GET/v1/jobs

List all jobs with optional filtering.

Query parameters

statusFilter by status: queued, processing, completed, failed
typeFilter by job type
limitResults per page (default: 20, max: 100)
offsetPagination offset
GET/v1/account

Get current account info and credit balance.

200 OK
{
  "id": "acc_abc123",
  "email": "dev@company.com",
  "plan": "pro",
  "credits_remaining": 287,
  "credits_used_this_period": 63,
  "period_ends_at": "2026-04-01T00:00:00Z"
}
GET/v1/brand-profiles

List your brand profiles.

200 OK
{
  "data": [
    {
      "id": "bp_abc123",
      "name": "Main Brand",
      "colors": ["#dd3333", "#1a1a1a", "#ffffff"],
      "fonts": ["Inter", "Montserrat"],
      "logo_url": "https://cdn.editingmachine.com/brands/bp_abc123/logo.png"
    }
  ]
}
DELETE/v1/jobs/:id

Cancel a queued or processing job. Refunds estimated credits.

200 OK
{
  "id": "job_xyz789",
  "status": "cancelled",
  "credits_refunded": 5
}

Webhooks

Receive real-time notifications when job status changes. Provide a webhook_url when creating a job, or configure a global webhook URL in your dashboard.

Event types

job.queuedJob has been accepted and queued for processing
job.processingAn editor has started working on the job
job.review_readyJob is ready for your review (if review mode is enabled)
job.completedJob is finished. Download URL is available
job.failedJob failed. Error details included in payload
job.publishedVideo has been published to one or more platforms
credits.lowCredit balance has dropped below threshold (configurable)

Example webhook payload

POST to your webhook_url
{
  "event": "job.completed",
  "timestamp": "2026-03-25T18:45:00Z",
  "data": {
    "job_id": "job_xyz789",
    "status": "completed",
    "type": "short_form",
    "credits_used": 5,
    "output": {
      "download_url": "https://cdn.editingmachine.com/deliverables/job_xyz789.mp4",
      "duration": 47,
      "file_size_mb": 28.4
    }
  }
}

Verification

All webhook requests include a signature header for verification:

Signature header
X-EM-Signature: sha256=<HMAC-SHA256 of request body using your webhook secret>

Your webhook secret is available in your dashboard alongside your API keys. Always verify signatures before processing webhook data.

Status Codes

200
OK — Request succeeded
201
Created — Resource created successfully
400
Bad Request — Invalid parameters or missing required fields
401
Unauthorized — Invalid or missing API key
403
Forbidden — API key doesn't have access to this resource
404
Not Found — Resource doesn't exist
402
Payment Required — Insufficient credits
429
Too Many Requests — Rate limit exceeded (60 requests/minute)
500
Internal Server Error — Something went wrong on our end

Error response format

Error response
{
  "error": {
    "code": "insufficient_credits",
    "message": "This job requires 18 credits but your balance is 12.",
    "credits_required": 18,
    "credits_available": 12
  }
}

Rate limits

The API enforces the following rate limits per API key:

General60 requests per minute
Job creation30 requests per minute

Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.

Ready to start building?

Get your API key and submit your first job in minutes.