API Documentation
Authentication
All API requests require a Bearer token. Generate your API key from the dashboard.
Authorization: Bearer agd_your_api_key_hereBase URL
https://agentdesk.dev/api/v1Endpoints
POST /tasks
Create and execute a task with optional review.
curl -X POST https://agentdesk.dev/api/v1/tasks \
-H "Authorization: Bearer agd_your_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a blog post about AI safety",
"api_key": "sk-ant-your-anthropic-key",
"system_prompt": "You are a technical writer",
"model": "claude-sonnet-4-6",
"review": true,
"review_type": "content",
"review_criteria": "Focus on accuracy and citations",
"dual_review": false,
"webhook_url": "https://your-app.com/webhook",
"max_tokens": 4096
}'Returns 202 with task ID. Poll GET /tasks/:id for results.
GET /tasks/:id
Get task status and results.
{
"id": "uuid",
"status": "completed",
"result": {
"output": "The generated content...",
"model": "claude-sonnet-4-6",
"tokens_used": 1523,
"duration_ms": 4200
},
"review": {
"verdict": "PASS",
"score": 87,
"issues": [],
"checklist": [
{ "item": "Factual accuracy", "status": "pass", "evidence": "All claims verified" }
],
"summary": "Content is well-structured and accurate."
}
}GET /tasks
List tasks with pagination.
GET /tasks?page=1&per_page=20&status=completedPOST /tasks/:id/review
Manually re-review an existing task output.
curl -X POST https://agentdesk.dev/api/v1/tasks/:id/review \
-H "Authorization: Bearer agd_your_key" \
-d '{ "dual": true, "criteria": "Check for security issues" }'POST /workflows
Create a multi-step workflow (Pro/Team only).
curl -X POST https://agentdesk.dev/api/v1/workflows \
-H "Authorization: Bearer agd_your_key" \
-d '{
"name": "Blog Pipeline",
"steps": [
{ "name": "outline", "prompt": "Create a blog outline about AI safety" },
{ "name": "draft", "prompt": "Write the full blog post from this outline", "review": true },
{ "name": "seo", "prompt": "Optimize the title and meta description", "review_type": "content" }
]
}'GET /usage
Check your current month's usage.
{
"period": "2026-03",
"tasks": { "used": 42, "limit": 1000 },
"reviews": { "used": 38, "limit": 500 }
}Review Types
Set review_type to apply specialized review criteria:
| Type | Focus |
|---|---|
content | Accuracy, readability, SEO, persona fit |
code | Correctness, security (OWASP), tests, quality |
marketing-strategy | Target clarity, channel fit, KPIs, positioning |
saas-design | API design, scalability, security, DX |
competitive-analysis | Feature accuracy, pricing, differentiation |
revenue-model | Unit economics, pricing-value fit, churn risk |
internationalization | i18n, localization, legal compliance |
Webhooks
Set webhook_url on task creation to receive results via POST when the task completes.
// Webhook payload
{
"event": "task.completed", // or "task.failed"
"task_id": "uuid",
"status": "completed",
"result": { "output": "...", "tokens_used": 1523 },
"review": { "verdict": "PASS", "score": 87 }
}Rate Limits
| Plan | Requests/min | Tasks/month | Reviews/month |
|---|---|---|---|
| Free | 10 | 20 | 10 |
| Starter ($29/mo) | 30 | 500 | 250 |
| Pro ($79/mo) | 60 | 5,000 | 2,500 |
| Team ($199/mo) | 120 | 50,000 | 25,000 |