API Documentation
Everything you need to integrate CraftAI into your stack
Preview Documentation
The API is under active development. Endpoints below represent the planned specification.
Authentication
All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Generate API keys from your CraftAI dashboard after account creation.
Workflows API
Create, execute, and monitor automated workflows.
Create Workflow
POST https://api.craftaiplatform.com/v1/workflows
Request Body
{
"name": "data-pipeline-v1",
"trigger": "webhook",
"steps": [
{
"type": "transform",
"model": "craftai-1",
"config": { "format": "json" }
},
{
"type": "route",
"conditions": [
{ "field": "priority", "op": "gte", "value": 8 }
]
}
],
"output": "s3://my-bucket/processed/"
}
Response
{
"id": "wf_a1b2c3d4",
"status": "active",
"created_at": "2026-03-01T10:00:00Z",
"endpoint": "https://api.craftaiplatform.com/v1/workflows/wf_a1b2c3d4/trigger",
"metrics": {
"executions": 0,
"avg_latency_ms": null
}
}
Example (Python)
import requests
resp = requests.post(
"https://api.craftaiplatform.com/v1/workflows",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"name": "my-pipeline",
"trigger": "cron",
"steps": [{"type": "transform", "model": "craftai-1"}]
}
)
print(resp.json())
Example (JavaScript)
const res = await fetch('https://api.craftaiplatform.com/v1/workflows', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'my-pipeline',
trigger: 'webhook',
steps: [{ type: 'transform', model: 'craftai-1' }]
})
});
const data = await res.json();
console.log(data);
Available Models
| Model | Description | Throughput | Price |
|---|---|---|---|
craftai-1 | General-purpose workflow engine | 2,000 rps | $0.0004/call |
craftai-1-fast | Low-latency optimized | 5,000 rps | $0.0007/call |
craftai-1-pro | Advanced reasoning & routing | 1,000 rps | $0.0012/call |
Rate Limits
| Plan | Requests/min | Burst |
|---|---|---|
| Builder | 60 | 100 |
| Scale | 300 | 500 |
| Enterprise | Custom | Custom |
Error Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
429 | Rate limit exceeded |
500 | Internal server error |
Official SDKs
Auto-generated SDKs for popular languages:
Python
pip install craftai-sdkComing SoonNode.js
npm install @craftai/sdkComing SoonGo
go get craftai.dev/sdkComing Soon