API Reference

Built for developers who need to ship.

REST API with Python and Node.js SDKs. Webhook callbacks when indexing completes. JSON responses with segment-level results, confidence scores, and transcript excerpts. Start querying in under 30 minutes.

Base URL: api.meshorai.com/v1 Auth: Bearer token Response: JSON
quickstart.py
import meshora

client = meshora.Client("sk_live_...")

# Submit a video for indexing
job = client.index(
    source="s3://my-archive/broadcasts/2024-03-14.mp4",
    archive_id="arch_q1_broadcast"
)
# job.id = "job_3kf9d2..." webhook fires on completion

# Search across indexed archive
results = client.search(
    query="product recall announcement March 2024",
    archive_id="arch_q1_broadcast"
)

for clip in results.clips:
    print(f"{clip.timecode}{clip.confidence:.0%}")
    # 01:24:07 — 96%
    # 00:04:33 — 89%

Three endpoints. All you need to index and search.

Submit video for indexing

Submit a video file URL or S3/GCS/Azure Blob path for indexing. Returns a job ID immediately. Processing runs asynchronously — use webhooks or poll /v1/jobs/:id for status.

source string, required S3/GCS/Azure path or direct HTTPS URL to video file
archive_id string, required Archive namespace to index into
webhook_url string, optional POST callback URL on job completion
signals array, optional Override signal set: ["speech","ocr","scene","emotion"]
curl
curl -X POST https://api.meshorai.com/v1/index \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "source": "s3://my-archive/video.mp4",
  "archive_id": "arch_q1_broadcast",
  "webhook_url": "https://your-app.com/webhooks/meshora"
}'

# Response
{
  "job_id": "job_3kf9d2abc",
  "status": "queued",
  "estimated_minutes": 18
}

Natural language video search

Search across indexed archives with a natural language query. Returns ranked clip segments with timecodes, confidence scores, matched signals, and transcript excerpts. P95 latency under 50ms at 10,000+ indexed hours.

query string, required Natural language search query
archive_id string, required Archive to search — or "all" for cross-archive
limit integer, optional Max results returned. Default: 10. Max: 100
signals array, optional Restrict matching to specific signal types
search-response.json
{
  "query": "product recall announcement",
  "latency_ms": 47,
  "clips": [
    {
      "file": "broadcast_Q1_2024.mp4",
      "timecode": "01:24:07",
      "timecode_ms": 5047100,
      "confidence": 0.96,
      "matched_signals": ["speech", "ocr"],
      "excerpt": "...we are initiating a recall..."
    }
  ]
}

Export clips, transcripts, and metadata

Export any indexed file's full transcript as JSON or SRT, request a clip segment trimmed to a specific timecode window, or pull the complete metadata manifest for a video. All exports return a signed download URL valid for 15 minutes.

:id string, required Video ID returned by the /v1/index job
format string, optional transcript_json | transcript_srt | clip | metadata
start_ms integer, optional Clip start time in milliseconds (required for clip format)
end_ms integer, optional Clip end time in milliseconds (required for clip format)
export.sh
# Export full transcript as SRT
curl "https://api.meshorai.com/v1/export/vid_abc123?format=transcript_srt" \
  -H "Authorization: Bearer sk_live_..."

# Export 30-second clip around timecode match
curl "https://api.meshorai.com/v1/export/vid_abc123
  ?format=clip&start_ms=5032100&end_ms=5062100" \
  -H "Authorization: Bearer sk_live_..."

# Response: { "download_url": "https://..." }

Official clients for Python and Node.

Python SDK

pip install meshora
  • Full type hints via dataclasses
  • Async support via meshora.AsyncClient
  • Auto-retry with exponential backoff
  • Python 3.9+ required

Node.js SDK

npm install @meshora/sdk
  • Full TypeScript definitions included
  • Promise-based with optional streaming
  • CommonJS + ESM builds provided
  • Node 18+ required

API key flow.

01

Create an account

Sign up at meshorai.com. Your API key is available immediately in Settings → API Keys. Each key is scoped to your account.

02

Pass as Bearer token

Include the key in the Authorization header on every request. Keys begin with sk_live_ (production) or sk_test_ (test mode, no billing).

03

Store securely

Never expose your API key in client-side code or public repositories. Store as an environment variable. Rotate keys anytime from your dashboard.

.env + usage
# .env
MESHORA_API_KEY=sk_live_your_key_here

# Python
import os
client = meshora.Client(os.environ["MESHORA_API_KEY"])

# Node.js
const client = new MeshoraClient(process.env.MESHORA_API_KEY)

Get your API key and start querying.

14-day trial. 10 free indexing hours. Your first search result in under 30 minutes.