API

Build with the ChatAnimate API

Automate your workflow with a powerful RESTful API. Create exports, generate AI conversations, and receive webhook notifications — all from your own code.

Authentication

StudioAPI access requires a Studio plan or higher

All API requests require a Bearer token in the Authorization header. Generate your API key from your dashboard under API Keys.

Authorization: Bearer sk_live_abc123...

Endpoints

POST/api/auth/exportsStudio

Create a new export from a conversation. Returns the export job details with a unique ID for status tracking.

Request Body

// Request Body
{
  "conversation_id": "conv_9x8k2m",
  "format": "mp4",
  "resolution": "1080p",
  "watermark": false
}

Response 201 Created

{
  "id": "exp_4f7a2b",
  "status": "processing",
  "format": "mp4",
  "resolution": "1080p",
  "created_at": "2025-01-15T10:30:00Z",
  "estimated_duration": 45
}
GET/api/auth/exports/{token}/statusStudio

Check the status of an export job. Poll this endpoint until the status returns done.

Path Parameters

ParameterTypeDescription
tokenstringThe unique export job token

Response 200 OK

{
  "id": "exp_4f7a2b",
  "status": "done",
  "output_url": "https://cdn.chatanimate.app/exports/exp_4f7a2b.mp4?signature=...",
  "format": "mp4",
  "resolution": "1080p",
  "created_at": "2025-01-15T10:30:00Z",
  "completed_at": "2025-01-15T10:30:45Z"
}
GET/api/auth/exportsStudio

List all exports for your account. Supports pagination with limit and offset query parameters.

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Number of results per page
offsetinteger0Offset for pagination

Response 200 OK

{
  "data": [
    {
      "id": "exp_4f7a2b",
      "status": "done",
      "format": "mp4",
      "resolution": "1080p",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 42,
  "limit": 20,
  "offset": 0
}
POST/api/auth/ai/generateComing SoonStudio

Generate a chat conversation using AI Writer. Provide a prompt describing the conversation and receive a ready-to-animate dialogue. This endpoint is not yet available.

Request Body

// Request Body
{
  "prompt": "A funny conversation between two friends about a new app",
  "participants": 2,
  "style": "casual",
  "language": "en"
}

Response 200 OK

{
  "id": "gen_8k3m1n",
  "conversation_id": "conv_n2p5qr",
  "messages": [
    {
      "sender": "Alex",
      "text": "Did you see that new app?"
    },
    {
      "sender": "Jordan",
      "text": "Yeah it's amazing! I've been using it all day"
    }
  ],
  "created_at": "2025-01-15T10:35:00Z"
}

Code Examples

# Create an export
curl -X POST https://api.chatanimate.app/api/auth/exports \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "conversation_id": "conv_9x8k2m",
    "format": "mp4",
    "resolution": "1080p",
    "watermark": false
  }'

# Check export status
curl https://api.chatanimate.app/api/auth/exports/exp_4f7a2b \
  -H "Authorization: Bearer sk_live_abc123..."

Replace sk_live_abc123... with your actual API key from the dashboard.

Webhooks

Event Types

export.completed

Sent when an export finishes rendering and is ready for download.

export.failed

Sent when an export fails due to an error during rendering.

Payload Format

Webhook payloads are sent as JSON in a POST request to your configured URL. All payloads include an event type, timestamp, and relevant data.

{
  "event": "export.completed",
  "timestamp": "2025-01-15T10:30:45Z",
  "data": {
    "id": "exp_4f7a2b",
    "status": "done",
    "download_url": "https://cdn.chatanimate.app/exports/exp_4f7a2b.mp4",
    "format": "mp4",
    "resolution": "1080p"
  }
}

Error Handling

Standard Error Format

All errors follow a consistent JSON structure with an error code, message, and optional details.

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please retry after 60 seconds.",
    "details": {
      "retry_after": 60
    }
  }
}

HTTP Status Codes

200

OK

The request was successful.

201

Created

A new resource was successfully created.

400

Bad Request

The request was malformed or missing required parameters.

401

Unauthorized

Missing or invalid API key in the Authorization header.

404

Not Found

The requested resource does not exist.

429

Rate Limit Exceeded

Too many requests. Retry after the time specified in the response.

500

Server Error

An unexpected error occurred on our end. Please try again later.

Ready to start building?

Get API access with the Studio plan and automate your content workflow.