Skip to main content

Base URL

https://reelmirror.com/api
All endpoints are prefixed with /v1.

Authentication

Every request must include an Authorization header with a Bearer token:
Authorization: Bearer rm_your_api_key
Two token types are supported:
TypeFormatUse case
API keyrm_xxxxxProgrammatic access
JWTSupabase session tokenBrowser/frontend
API keys are created via POST /v1/api-keys. JWT users automatically have all scopes.

Scopes

API keys can be restricted to specific scopes:
ScopeDescription
personas:readRead personas
personas:writeCreate, update, delete personas
sources:readList sources
sources:writeAdd, remove sources
content:readRead content, poll status
content:writeGenerate, clone, toggle public
sync:writeTrigger sync
billing:readView balance and transactions
uploads:writeUpload files

Rate Limiting

Auth typeLimit
API key60 requests/minute
JWT120 requests/minute
Rate limit info is included in response headers:
  • X-RateLimit-Limit - Maximum requests per window
  • X-RateLimit-Remaining - Requests remaining
  • X-RateLimit-Reset - Unix timestamp when window resets

Error Format

All errors follow a consistent format:
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Persona not found",
    "details": {}
  }
}
CodeStatusDescription
VALIDATION_ERROR400Invalid request body
UNAUTHORIZED401Missing or invalid auth
INSUFFICIENT_BALANCE402Not enough credits
FORBIDDEN403Missing scope or permission
NOT_FOUND404Resource not found
CONFLICT409Duplicate resource
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error
UPSTREAM_ERROR502External service error
SERVICE_UNAVAILABLE503Service temporarily down

Pagination

List endpoints support pagination via query parameters:
ParameterDefaultMaxDescription
limit20100Results per page
offset0-Results to skip
Response format:
{
  "data": [...],
  "count": 42
}