Skip to main content

API Overview

Integrate Crella.ai into your applications.

Base URL

https://api.crella.ai/v1

Authentication

All API requests require authentication via API key:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.crella.ai/v1/agents

Getting an API Key

  1. Log in to crella.ai
  2. Navigate to Settings → API Keys
  3. Create a new key
  4. Store securely (shown only once)

Rate Limits

TierRequests/MinRequests/Day
Free10100
Starter605,000
Growth30050,000
EnterpriseCustomCustom

Endpoints Overview

Agents

MethodEndpointDescription
GET/agentsList all agents
GET/agents/{id}Get agent details
POST/agents/{id}/chatChat with agent
POST/agents/{id}/taskSubmit task

Tasks

MethodEndpointDescription
POST/tasksCreate task
GET/tasks/{id}Get task status
GET/tasksList tasks
DELETE/tasks/{id}Cancel task

Workflows

MethodEndpointDescription
POST/workflowsCreate workflow
GET/workflows/{id}Get workflow status
POST/workflows/{id}/executeExecute workflow

Quick Start

1. Chat with an Agent

curl -X POST https://api.crella.ai/v1/agents/quinn/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Help me design a lead processing workflow"
}'

Response:

{
"reply": "I'd be happy to help design a lead processing workflow...",
"agent": "quinn",
"usage": {
"input_tokens": 12,
"output_tokens": 245
}
}

2. Submit a Task

curl -X POST https://api.crella.ai/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent": "ALPHA001",
"type": "lead_validation",
"payload": {
"name": "John Smith",
"email": "john@example.com",
"company": "Acme Corp"
}
}'

Response:

{
"task_id": "task_abc123",
"status": "queued",
"agent": "ALPHA001",
"estimated_completion": "2026-01-16T10:30:00Z"
}

3. Check Task Status

curl https://api.crella.ai/v1/tasks/task_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"task_id": "task_abc123",
"status": "completed",
"result": {
"validated": true,
"quality_score": 85,
"normalized_data": {
"name": "John Smith",
"email": "john@example.com",
"company": "Acme Corp"
}
},
"cost": 0.002,
"processing_time_ms": 180
}

SDKs

JavaScript/TypeScript

npm install @crella/sdk
import { Crella } from '@crella/sdk';

const crella = new Crella({ apiKey: 'YOUR_API_KEY' });

// Chat with agent
const response = await crella.agents.chat('quinn', {
message: 'Design a workflow for me'
});

// Submit task
const task = await crella.tasks.create({
agent: 'ALPHA001',
type: 'lead_validation',
payload: { name: 'John', email: 'john@example.com' }
});

Python

pip install crella
from crella import Crella

client = Crella(api_key='YOUR_API_KEY')

# Chat with agent
response = client.agents.chat('quinn', message='Design a workflow')

# Submit task
task = client.tasks.create(
agent='ALPHA001',
type='lead_validation',
payload={'name': 'John', 'email': 'john@example.com'}
)

Webhooks

Receive real-time notifications for task events:

{
"webhook_url": "https://your-app.com/webhooks/crella",
"events": ["task.completed", "task.failed"]
}

Webhook Payload:

{
"event": "task.completed",
"task_id": "task_abc123",
"timestamp": "2026-01-16T10:30:00Z",
"data": {
"status": "completed",
"result": {...}
}
}

Error Handling

StatusMeaning
200Success
400Bad request
401Unauthorized
403Forbidden
404Not found
429Rate limited
500Server error

Error Response:

{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Please retry after 60 seconds.",
"retry_after": 60
}
}

Further Documentation