Skip to main content

API Overview

The Char AI API is a RESTful interface for managing your AI-powered embedded agents.

Base URL

Authentication

See the Authentication guide for details on obtaining tokens.

Request Format

All requests should include:
Content-Type: application/json
Authorization: Bearer <token>

Response Format

Successful responses return JSON with the requested data:
{
  "id": "site_123abc",
  "name": "My Application",
  "allowed_origins": ["https://example.com"],
  "created_at": "2024-01-15T10:30:00Z"
}

Pagination

List endpoints support pagination:
ParameterTypeDefaultDescription
limitinteger20Items per page (max 100)
offsetinteger0Number of items to skip
GET /api/sites?limit=10&offset=20
Paginated responses include metadata:
{
  "data": [...],
  "pagination": {
    "total": 150,
    "limit": 10,
    "offset": 20,
    "has_more": true
  }
}

Rate Limits

PlanRequests/minute
Free60
Pro300
EnterpriseCustom
Rate limit headers are included in responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705318200

Versioning

The API is versioned via the URL path. The current version is v1:
https://app.meetchar.ai/api/v1/sites
When no version is specified, requests default to the latest stable version.