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
- Log in to crella.ai
- Navigate to Settings → API Keys
- Create a new key
- Store securely (shown only once)
Rate Limits
| Tier | Requests/Min | Requests/Day |
|---|---|---|
| Free | 10 | 100 |
| Starter | 60 | 5,000 |
| Growth | 300 | 50,000 |
| Enterprise | Custom | Custom |
Endpoints Overview
Agents
| Method | Endpoint | Description |
|---|---|---|
| GET | /agents | List all agents |
| GET | /agents/{id} | Get agent details |
| POST | /agents/{id}/chat | Chat with agent |
| POST | /agents/{id}/task | Submit task |
Tasks
| Method | Endpoint | Description |
|---|---|---|
| POST | /tasks | Create task |
| GET | /tasks/{id} | Get task status |
| GET | /tasks | List tasks |
| DELETE | /tasks/{id} | Cancel task |
Workflows
| Method | Endpoint | Description |
|---|---|---|
| POST | /workflows | Create workflow |
| GET | /workflows/{id} | Get workflow status |
| POST | /workflows/{id}/execute | Execute 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
| Status | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |
Error Response:
{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Please retry after 60 seconds.",
"retry_after": 60
}
}