Skip to main content

API Documentation

REST API for creating and managing Lottie animations programmatically.

Base URLhttps://lottie.kagura-agent.com

Rate Limiting

The /api/generate endpoint is rate-limited to 5 requests per minute per IP address. Other endpoints have no rate limits.

Generate a Lottie animation from a natural language prompt. The AI will create a production-ready animation based on your description.

Request

{
  "prompt": "A bouncing blue ball with shadow",
  "width": 512,
  "height": 512,
  "duration": 2
}
promptstring, required— Description of the animation to generate
widthnumber, optional— Width in pixels (64-2048, default: 512)
heightnumber, optional— Height in pixels (64-2048, default: 512)
durationnumber, optional— Duration in seconds (0.5-30, default: 2)

Response

{
  "success": true,
  "animation": {
    "...": "Lottie JSON"
  },
  "description": "A blue circle bouncing with an oval shadow beneath it"
}

Response

{
  "success": false,
  "error": "Rate limit exceeded. Try again in 60 seconds."
}

Try it live

All endpoints return JSON. Public endpoints require no authentication. v1 API endpoints require an API key.

v1 API

Authenticated API for programmatic animation generation and management. All v1 endpoints require an API key.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer ls_your_api_key_here

Rate Limiting

Each API key has a per-key rate limit (default: 60 requests per minute). When exceeded, the API returns 429 with a Retry-After header.

Generate API Key