---
title: "Developer API Documentation - ContentIndexer | ContentIndexer"
description: "REST API for AI-powered video analysis. Extract faces, objects, transcription, shot detection and more. OpenAPI spec, authentication docs, and code examples."
image: "https://www.contentindexer.com/og-image.png"
---

Overview

API Documentation

# ContentIndexer API

AI-powered video analysis. Submit a video, get back structured intelligence.

For AI assistants:[llms.txt](/llms.txt)·[llms-full.txt](/llms-full.txt)·[openapi.yaml](/openapi.yaml)

## Overview

ContentIndexer is an AI-powered video analysis API. Submit a video URL or file and get back structured data: faces detected, objects identified, shot cuts, transcription with speaker diarization, CLIP semantic embeddings, and more. Built for video editors, production companies, and developers building video intelligence into their apps.

Face detection

Bounding boxes, tracking across frames

Object detection

Labeled objects with confidence scores

Pose & hand tracking

Body keypoints via MediaPipe

Transcription

Word-level timestamps + speaker IDs

Shot detection

Scene cuts via FFmpeg

CLIP embeddings

512-dim semantic vectors per frame

Video editor export

OTIO, FCPXML, CSV timeline markers

Webhooks

Push notifications when jobs complete

Base URL`https://api.contentindexer.com`

Format`JSON`

Auth`Bearer token`

## Quick Start

Get your first results in under 2 minutes.

1

### Get an API key from the dashboard

Sign in to your [dashboard](/dashboard) and create an API key. Keys start with `ci_`.

# Your API key looks like this:
ci_abc123xyz456def789...

Copy

2

### Submit a job

POST a YouTube link (or the `content_id` of an upload) with the extractors you want. Other links (a direct .mp4, Vimeo, Loom) return 400 with no credit used: upload the file first. `workflow` is a comma-separated list of extractor names.

cURLJavaScriptPython

curl -X POST "https://api.contentindexer.com/v1/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_url": "https://www.youtube.com/watch?v=VIDEO_ID",
    "workflow": "ffprobe,mediapipe,transcription"
  }'

Copy

3

### Poll for completion

Check the job status until it reaches `completed` or `failed`. Or use webhooks to avoid polling entirely.

cURLJavaScriptPython

curl "https://api.contentindexer.com/v1/jobs/{jobId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Copy

4

### Fetch results

Retrieve structured data for any extractor that ran on the job.

cURLJavaScriptPython

curl "https://api.contentindexer.com/v1/results/{jobId}/mediapipe" \
  -H "Authorization: Bearer YOUR_API_KEY"

Copy

## Authentication

All requests must include your API key in the `Authorization` header using the Bearer scheme.

Authorization: Bearer ci_abc123xyz456def789...

Copy

### Auth Methods

RecommendedAPI Keys — server-to-server

Static keys prefixed with `ci_`. Manage them from your dashboard or via the API.

OAuth Bearer Tokens — user-facing apps

Short-lived JWTs issued after OAuth login. Use for apps where end-users authenticate directly.

Security best practices

- Never commit API keys to version control
- Store keys in environment variables or a secrets manager
- Use separate keys for development and production
- Rotate keys regularly and after any suspected exposure
- Scope keys to the minimum permissions required

## API Keys

Create and manage API keys programmatically. Keys are only displayed once at creation time — store them securely.

POST`/v1/api-keys`Create a new API key

GET`/v1/api-keys`List all API keys

DELETE`/v1/api-keys?keyId={id}`Deactivate an API key

### Create an API key

Request body: `name` (string, required) and `expiresInDays` (integer, optional).

cURLJavaScriptPython

curl -X POST "https://api.contentindexer.com/v1/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Production Server", "expiresInDays": 365}'

Copy

### Response

{
  "key": {
    "id":         "key_01HXG5K3...",
    "name":       "Production Server",
    "value":      "ci_abc123xyz456def789...",
    "created_at": "2025-06-01T12:00:00Z",
    "expires_at": "2026-06-01T12:00:00Z",
    "last_used":  null
  }
}

Copy

The `value` field is only returned once. Copy and store it immediately — subsequent requests will not show the key value.

## Jobs

Jobs are the core unit of work. Submit a YouTube link, or the content\_id of a file you uploaded, with a workflow (comma-separated extractor names), then poll or subscribe to webhooks for completion.

POST`/v1/jobs`Submit a new job

GET`/v1/jobs`List jobs (limit, offset)

GET`/v1/jobs/{jobId}`Get job status and metadata

### Job status values

pendingprocessingcompletedfailedcancelled

### Job response shape

{
  "id":           "01HXFJKM4NPQRS7WABCDEF",
  "status":       "completed",
  "content_url":  "https://www.youtube.com/watch?v=VIDEO_ID",
  "workflow":     "ffprobe,mediapipe,transcription",
  "created_at":   "2025-06-01T12:00:00Z",
  "started_at":   "2025-06-01T12:00:03Z",
  "completed_at": "2025-06-01T12:02:47Z",
  "error":        null
}

Copy

### Polling with backoff

For short videos (under 5 min), poll every 3–5 seconds. For longer videos use exponential backoff. Or use webhooks to eliminate polling entirely.

cURLJavaScriptPython

curl "https://api.contentindexer.com/v1/jobs/{jobId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Copy

## Content

Add videos to ContentIndexer by uploading a file or referencing an external URL (including YouTube links). Referenced content is fetched and stored on our infrastructure.

POST`/v1/content/upload`Upload a video file (multipart/form-data)

POST`/v1/content/reference`Reference a YouTube URL or external link

GET`/v1/content`List your content (limit, offset)

DELETE`/v1/content/{contentId}`Delete content and associated data

### Upload a file

curl -X POST "https://api.contentindexer.com/v1/content/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/video.mp4" \
  -F "name=My Wedding Video"

Copy

### Reference a URL

curl -X POST "https://api.contentindexer.com/v1/content/reference" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url":  "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "name": "Reference Video"
  }'

Copy

### Content response shape

{
  "id":          "cnt_01HXG5K3...",
  "name":        "My Wedding Video",
  "source_url":  "https://example.com/video.mp4",
  "duration_s":  247,
  "size_bytes":  104857600,
  "status":      "ready",
  "created_at":  "2025-06-01T12:00:00Z"
}

Copy

## Extractors

Extractors are modular AI models that run as part of a job workflow. Mix and match the extractors you need — you're only billed for what you use.

GET`/v1/extractors`List available extractors

POST`/v1/jobs/estimate`Estimate cost before submitting

### Available extractors

| Name                    | Description                                          | Billing    |
| ----------------------- | ---------------------------------------------------- | ---------- |
| ffprobe                 | Video metadata — duration, fps, resolution, codec    | Per second |
| mediapipe               | Face, object, pose, and hand detection per frame     | Per second |
| transcription           | Speech-to-text with speaker diarization (AssemblyAI) | Per second |
| clip\_embeddings        | 512-dim CLIP ViT-B/16 vectors for semantic search    | Per second |
| ffmpeg\_shot\_detection | Scene cut detection and shot boundary identification | Per second |

What shot detection catches and misses, measured: [why threshold shot detectors miss dissolves](/blog/why-shot-detectors-miss-dissolves).

### Estimate cost before submitting

curl -X POST "https://api.contentindexer.com/v1/jobs/estimate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "duration_seconds": 300,
    "detectors": ["face_detection", "transcription"]
  }'

# Response:
{
  "duration_seconds": 300,
  "detectors":        ["face_detection", "transcription"],
  "estimated_cost_usd": 0.078,
  "breakdown": {
    "face_detection": 0.024,
    "transcription":  0.054
  },
  "note": "Estimate assumes full-duration processing. Actual cost may vary slightly."
}

Copy

## Results

Once a job is `completed`, fetch structured results for any extractor that ran.

GET`/v1/results/{jobId}/{extractorName}`Get results for a specific extractor

### ffprobe response

{
  "duration_s": 247.3,
  "fps": 29.97,
  "width": 1920,
  "height": 1080,
  "codec": "h264",
  "bitrate_kbps": 8500,
  "audio_codec": "aac",
  "audio_channels": 2
}

Copy

### transcription response

{
  "text": "Welcome everyone. Today we're here to celebrate...",
  "words": [
    {
      "text":       "Welcome",
      "start_ms":   1240,
      "end_ms":     1720,
      "speaker":    "A",
      "confidence": 0.98
    },
    {
      "text":       "everyone",
      "start_ms":   1780,
      "end_ms":     2100,
      "speaker":    "A",
      "confidence": 0.97
    }
  ],
  "speakers": ["A", "B"],
  "sentiment_by_sentence": [
    {
      "text":      "Welcome everyone.",
      "sentiment": "positive",
      "start_ms":  1240,
      "end_ms":    2500
    }
  ],
  "key_phrases": ["celebrate", "ceremony", "thank you"]
}

Copy

### mediapipe response (excerpt)

{
  "frames": [
    {
      "timestamp_s": 0.2,
      "face_detection": [
        {
          "bbox":       { "x": 0.21, "y": 0.15, "w": 0.18, "h": 0.32 },
          "confidence": 0.94,
          "track_id":   1
        }
      ],
      "object_detection": [
        {
          "label":      "person",
          "confidence": 0.88,
          "bbox":       { "x": 0.1, "y": 0.0, "w": 0.4, "h": 0.9 }
        }
      ]
    }
  ]
}

Copy

## Webhooks

Subscribe to events to receive push notifications instead of polling. ContentIndexer POSTs a signed JSON payload to your endpoint when events occur.

POST`/v1/webhooks/subscriptions`Create a subscription

GET`/v1/webhooks/subscriptions`List subscriptions

DELETE`/v1/webhooks/subscriptions/{id}`Remove a subscription

### Create a subscription

curl -X POST "https://api.contentindexer.com/v1/webhooks/subscriptions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url":    "https://yourapp.com/webhooks/contentindexer",
    "events": ["job.completed", "job.failed"]
  }'

Copy

### Available events

`job.completed` `job.failed` `job.processing` `credits.low`

### Webhook payload

{
  "event":     "job.completed",
  "job_id":    "01HXFJKM4NPQRS7WABCDEF",
  "status":    "completed",
  "timestamp": "2025-06-01T12:02:47Z",
  "data": {
    "workflow":   "ffprobe,mediapipe",
    "duration_s": 247
  }
}

Copy

### Signature verification

Every webhook request includes an `X-Signature` header: an HMAC-SHA256 hex digest of the raw request body signed with your webhook secret. Always verify this in production.

PythonJavaScript

import hmac, hashlib

def verify_signature(body: bytes, secret: str, signature: str) -> bool:
    expected = hmac.new(
        secret.encode('utf-8'),
        body,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature)

# In your webhook handler:
body = request.body          # raw bytes
sig  = request.headers['X-Signature']
if not verify_signature(body, WEBHOOK_SECRET, sig):
    return Response(status=401)

Copy

Webhooks are retried up to 5 times with exponential backoff if your endpoint returns a non-2xx status. Return 200 quickly — process events asynchronously to avoid timeouts.

## Pricing & Credits

ContentIndexer uses a prepaid credits model. Purchase credits in advance — no subscriptions, no monthly minimums. Credits are charged per second of video processed per extractor.

Pay as you go

Purchase only what you need

Volume bonuses

Bonus credits on larger packages (e.g. 15% on $100)

Credits never expire

Use them on your schedule

GET`/v1/credit-packages`List available packages

POST`/v1/jobs/estimate`Estimate job cost before submitting

GET`/v1/user/billing-history`Your credit transaction history

GET`/v1/user/billing-stats`Summary stats (balance, usage)

### Check your balance

curl "https://api.contentindexer.com/v1/user/billing-stats" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response:
{
  "credits_balance":  1847,
  "credits_used":     3210,
  "credits_purchased": 5057,
  "jobs_completed":   42
}

Copy

## Rate Limits

Rate limits protect the API from abuse and ensure fair access. When exceeded, the API returns `429 Too Many Requests` with a `Retry-After` header.

| Limit          | Window     | Scope              |
| -------------- | ---------- | ------------------ |
| 100 requests   | 10 seconds | Per IP address     |
| 1,000 requests | 1 hour     | Per user / API key |

### Retry with exponential backoff

async function withRetry(fn, maxAttempts = 5) {
  let delay = 1000;
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    try {
      return await fn();
    } catch (err) {
      if (err.status !== 429 || attempt === maxAttempts) throw err;
      const retryAfter = err.headers?.['retry-after'];
      const wait = retryAfter ? parseInt(retryAfter) * 1000 : delay;
      console.log(`Rate limited. Waiting ${wait}ms (attempt ${attempt})`);
      await new Promise(r => setTimeout(r, wait));
      delay = Math.min(delay * 2, 60000); // cap at 60s
    }
  }
}

Copy

Response headers include `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` so you can proactively throttle your requests.

## Error Handling

All errors follow RFC 7807 Problem Details format. Every error response includes a `request_id` you can share with support.

### Error response shape

{
  "type":       "https://contentindexer.com/errors/unauthorized",
  "title":      "Unauthorized",
  "status":     401,
  "detail":     "Invalid or expired API key. Check your Authorization header.",
  "request_id": "req_01HXG5K3NPQRS7W"
}

Copy

### HTTP status codes

| Code | Status                | When                                       |
| ---- | --------------------- | ------------------------------------------ |
| 200  | OK                    | Request succeeded                          |
| 201  | Created               | Resource created (e.g. job, API key)       |
| 400  | Bad Request           | Invalid parameters or request body         |
| 401  | Unauthorized          | Missing or invalid API key                 |
| 403  | Forbidden             | Authenticated but insufficient permissions |
| 404  | Not Found             | Resource does not exist                    |
| 409  | Conflict              | Resource already exists                    |
| 429  | Too Many Requests     | Rate limit exceeded                        |
| 500  | Internal Server Error | Unexpected server-side failure             |

Always check the `detail` field for a human-readable explanation and the `request_id` when contacting support — it lets us trace your specific request in our logs.

## Code Examples

Full end-to-end example: authenticate, submit a job, poll for completion, and fetch results.

cURLJavaScriptPython

# 1. Get your user profile
curl "https://api.contentindexer.com/v1/user/me" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 2. Submit a job
JOB=$(curl -s -X POST "https://api.contentindexer.com/v1/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content_url":"https://www.youtube.com/watch?v=VIDEO_ID","workflow":"ffprobe,mediapipe"}')
JOB_ID=$(echo $JOB | jq -r '.id')

# 3. Poll until complete
while true; do
  STATUS=$(curl -s "https://api.contentindexer.com/v1/jobs/$JOB_ID" \
    -H "Authorization: Bearer YOUR_API_KEY" | jq -r '.status')
  echo "Status: $STATUS"
  [ "$STATUS" = "completed" ] && break
  [ "$STATUS" = "failed" ] && exit 1
  sleep 5
done

# 4. Fetch results
curl "https://api.contentindexer.com/v1/results/$JOB_ID/mediapipe" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq

Copy

### Export to video editor

Convert AI detections into timeline markers you can import into Final Cut Pro, DaVinci Resolve, or any OpenTimelineIO-compatible NLE.

# Generate OTIO export with all composite scene analysis
curl "https://api.contentindexer.com/v1/jobs/${JOB_ID}/export?format=otio&composite=all" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq

# Response includes a presigned download URL:
{
  "format":     "otio",
  "export_url": "https://s3.amazonaws.com/...?X-Amz-Signature=...",
  "expires_at": "2025-06-01T13:02:47Z",
  "markers":    247
}

Copy

### Upload and process in one flow

# 1. Upload file
CONTENT=$(curl -s -X POST "https://api.contentindexer.com/v1/content/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@./footage.mp4")
CONTENT_ID=$(echo $CONTENT | jq -r '.id')

# 2. Submit job using content ID
JOB=$(curl -s -X POST "https://api.contentindexer.com/v1/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{"content_id": "$CONTENT_ID", "workflow": "ffprobe,mediapipe,ffmpeg_shot_detection"}")
echo "Job: $(echo $JOB | jq -r '.id')"

# 3. Wait for completion and export
JOB_ID=$(echo $JOB | jq -r '.id')
# ... poll as shown above, then:
curl "https://api.contentindexer.com/v1/jobs/$JOB_ID/export?format=fcpxml" \
  -H "Authorization: Bearer YOUR_API_KEY"

Copy

[OpenAPI Spec](/openapi.yaml)[Get API Key](/dashboard)[Example Code](https://github.com/contentindexer/examples)

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://www.contentindexer.com/#organization",
      "name": "ContentIndexer",
      "url": "https://www.contentindexer.com",
      "logo": {
        "@type": "ImageObject",
        "url": "https://www.contentindexer.com/og-image.png",
        "width": 1200,
        "height": 630
      },
      "sameAs": [
        "https://github.com/scotthavird"
      ],
      "founder": {
        "@type": "Person",
        "@id": "https://www.contentindexer.com/about#person",
        "name": "Scott Havird",
        "url": "https://github.com/scotthavird"
      }
    },
    {
      "@type": "WebSite",
      "@id": "https://www.contentindexer.com/#website",
      "url": "https://www.contentindexer.com",
      "name": "ContentIndexer",
      "description": "ContentIndexer lets coding agents understand video: it turns a screen recording into the screens that changed and what was said over each, as Markdown that Claude Code, Cursor or ChatGPT can read and act on.",
      "publisher": {
        "@id": "https://www.contentindexer.com/#organization"
      },
      "inLanguage": "en-US"
    },
    {
      "@type": "SoftwareApplication",
      "name": "ContentIndexer",
      "url": "https://www.contentindexer.com",
      "applicationCategory": "DeveloperApplication",
      "applicationSubCategory": "Video to slides and transcript",
      "operatingSystem": "Web",
      "description": "ContentIndexer lets coding agents understand video: it turns a screen recording into the screens that changed and what was said over each, as Markdown that Claude Code, Cursor or ChatGPT can read and act on.",
      "offers": {
        "@type": "Offer",
        "price": "0",
        "priceCurrency": "USD",
        "description": "$5 free credit at sign-up, then prepaid pay-per-use credit"
      },
      "featureList": [
        "One image per slide or screen from any video, captured once the screen settles",
        "Ignores cursor movement, webcam bubbles and call chrome; merges bullet builds; dedupes repeated slides",
        "slides.md pairing each slide with the transcript spoken over it, plus numbered PNGs and manifest.json",
        "Speaker-labelled transcription",
        "Faces, shot changes and key moments as OTIO, FCPXML and CSV timelines for Premiere Pro, Final Cut Pro and DaVinci Resolve",
        "REST API and an MCP server for AI agents"
      ],
      "screenshot": "https://www.contentindexer.com/og-image.png",
      "publisher": {
        "@id": "https://www.contentindexer.com/#organization"
      },
      "audience": {
        "@type": "ProfessionalAudience",
        "audienceType": "Engineers, product teams, researchers, video editors"
      }
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "WebAPI",
  "name": "ContentIndexer API",
  "description": "REST API for AI-powered video analysis. Extract faces, objects, shot types, scene changes, transcriptions, CLIP embeddings, and more from video footage.",
  "documentation": "https://contentindexer.com/docs/developer",
  "url": "https://api.contentindexer.com",
  "termsOfService": "https://contentindexer.com/terms",
  "provider": {
    "@id": "https://contentindexer.com/#organization"
  }
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "ContentIndexer Developer API Documentation",
  "description": "Authentication, endpoints, webhooks, and code examples for the ContentIndexer REST API.",
  "datePublished": "2025-01-15",
  "dateModified": "2026-04-18",
  "author": {
    "@id": "https://contentindexer.com/about#person"
  },
  "publisher": {
    "@id": "https://contentindexer.com/#organization"
  },
  "proficiencyLevel": "Expert",
  "dependencies": "REST client, HTTPS, JSON",
  "mainEntityOfPage": "https://contentindexer.com/docs/developer",
  "inLanguage": "en-US"
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://contentindexer.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Docs",
      "item": "https://contentindexer.com/docs/developer"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Developer API",
      "item": "https://contentindexer.com/docs/developer"
    }
  ]
}
```
