API Reference
Integrate deep research into your applications. Create research requests, poll for status, and retrieve structured reports via REST API.
https://airesearchos.com/api/v1Authentication
All API requests require a Bearer token. Generate your API key from Dashboard > Settings (requires Pro plan).
curl https://airesearchos.com/api/v1/credits \ -H "Authorization: Bearer aro_sk_your_api_key_here"
Your API key is shown once on generation. Store it securely. If lost, generate a new one (the old key is revoked immediately).
Quickstart
Three steps: create a research request, poll until complete, fetch the report.
Step 1 - Create research
curl -X POST https://airesearchos.com/api/v1/research \
-H "Authorization: Bearer aro_sk_..." \
-H "Content-Type: application/json" \
-d '{
"query": "Impact of GLP-1 drugs on the food industry",
"mode": "dueDiligence",
"skipClarifyingQuestions": true
}'
# Response: { "id": "abc-123", "status": "queued", "creditsCharged": 25, ... }Step 2 - Poll status (every 10s)
curl https://airesearchos.com/api/v1/research/abc-123 \
-H "Authorization: Bearer aro_sk_..."
# Response: { "status": "searching", "progress": 45, "currentStep": "Searching source 12 of 25..." }Step 3 - Get the full report
curl https://airesearchos.com/api/v1/research/abc-123/output \
-H "Authorization: Bearer aro_sk_..."
# Response: { "report": { "markdown": "# Full Report...", "sections": [...] }, "sources": [...], "metadata": {...} }Endpoints
/api/v1/researchCreate a new research request. Credits are charged immediately. If clarifying questions are generated, the research waits for answers before starting.
Example Request
curl -X POST https://airesearchos.com/api/v1/research \
-H "Authorization: Bearer aro_sk_..." \
-H "Content-Type: application/json" \
-d '{
"query": "Impact of GLP-1 drugs on the food industry",
"mode": "dueDiligence",
"reportLength": "standard",
"skipClarifyingQuestions": true
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | yes | Research prompt (10-2000 characters) |
| mode | enum | yes | "scan" | "dueDiligence" | "missionCritical" |
| reportLength | enum | no | "concise" | "standard" (default) | "extended" |
| includeSocialSources | boolean | no | Include blogs, forums, Reddit, and social media sources. Default: true. Set to false for authoritative-only sourcing. |
| skipClarifyingQuestions | boolean | no | Skip clarifying questions and start immediately. Default: false |
| clarifyingAnswers | string[] | no | Pre-supply answers (max 3). If provided, research starts immediately. |
Response (with clarifying questions)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "clarifying",
"creditsCharged": 25,
"creditsRemaining": 125,
"clarifyingQuestions": [
"Which GLP-1 drugs should anchor the analysis?",
"Should we focus on CPG companies, restaurant chains, or grocery retailers?",
"Should the report emphasize analyst projections or consumer behavior data?"
],
"createdAt": "2026-02-10T05:00:00Z"
}Response (with skipClarifyingQuestions: true)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"creditsCharged": 25,
"creditsRemaining": 125,
"createdAt": "2026-02-10T05:00:00Z"
}/api/v1/research/{id}/clarifySubmit answers to clarifying questions. Only valid when research status is "clarifying". Triggers the research to start.
Example Request
curl -X POST https://airesearchos.com/api/v1/research/550e8400-.../clarify \
-H "Authorization: Bearer aro_sk_..." \
-H "Content-Type: application/json" \
-d '{
"answers": [
"Focus on the full GLP-1 class including oral formulations",
"CPG companies and restaurant chains",
"Both Wall Street projections and consumer behavior data"
]
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| answers | string[] | yes | Answers to the clarifying questions (1-3 items, non-empty strings) |
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"message": "Research started"
}Errors
409 - Research is not in "clarifying" status
/api/v1/research/{id}Get the current status and progress of a research request. Use this for polling. The X-Poll-Interval header suggests a 10-second polling interval.
Example Request
curl https://airesearchos.com/api/v1/research/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer aro_sk_..."
Response (in progress)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "searching",
"progress": 45,
"currentStep": "Searching source 12 of 25...",
"query": "Impact of GLP-1 drugs on the food industry",
"mode": "dueDiligence",
"creditsCharged": 25,
"createdAt": "2026-02-10T05:00:00Z",
"startedAt": "2026-02-10T05:00:05Z",
"completedAt": null
}Response (completed)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"progress": 100,
"report": {
"markdown": "# Impact of GLP-1 Drugs on the Food Industry\n\n...",
"totalSources": 87,
"totalLearnings": 42
}
}Status Values
| Status | Meaning |
|---|---|
| pending | Created, not yet started |
| clarifying | Waiting for clarifying question answers |
| queued | Sent to research engine |
| processing | Research engine acknowledged, starting work |
| searching | Actively searching and analyzing sources |
| generating_report | Compiling final report from research |
| completed | Done - report is available |
| failed | Error occurred - credits refunded |
| timeout | Exceeded 1-hour time limit - credits refunded |
/api/v1/research/{id}/outputGet the full structured report. Only available when status is "completed". Returns 409 otherwise.
Example Request
curl https://airesearchos.com/api/v1/research/550e8400-e29b-41d4-a716-446655440000/output \ -H "Authorization: Bearer aro_sk_..."
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"query": "Impact of GLP-1 drugs on the food industry",
"report": {
"markdown": "# Full Report Title\n\n## Executive Summary\n...",
"sections": [
{ "title": "Executive Summary", "content": "..." }
]
},
"sources": ["https://www.nature.com/articles/..."],
"metadata": {
"mode": "dueDiligence",
"totalSources": 87,
"totalLearnings": 42,
"processingTimeSeconds": 505
}
}/api/v1/researchList your research requests with optional filtering and pagination.
Example Request
curl "https://airesearchos.com/api/v1/research?status=completed&limit=10" \ -H "Authorization: Bearer aro_sk_..."
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | no | Filter by status (e.g., "completed", "processing") |
| limit | number | no | Results per page, 1-100. Default: 20 |
| offset | number | no | Pagination offset. Default: 0 |
| sort | string | no | Sort field:direction. Default: "created_at:desc" |
Response
{
"data": [
{
"id": "550e8400-...",
"query": "Impact of GLP-1 drugs...",
"mode": "dueDiligence",
"status": "completed",
"creditsCharged": 25
}
],
"pagination": { "total": 47, "limit": 20, "offset": 0, "hasMore": true }
}/api/v1/creditsCheck your current credits balance. Daily credits reset automatically.
Example Request
curl https://airesearchos.com/api/v1/credits \ -H "Authorization: Bearer aro_sk_..."
Response
{
"daily": { "allocated": 150, "used": 25, "remaining": 125, "resetsAt": "2026-02-11T05:00:00Z" },
"purchased": { "balance": 500 },
"totalAvailable": 625
}Research Modes
| Mode | Credits | Sources | Time | Best For |
|---|---|---|---|---|
| scan | 10 | 10-20 | ~10 min | Quick validation, fact-checking |
| dueDiligence | 25 | 50-100 | ~30 min | Roadmap decisions, competitive analysis |
| missionCritical | 100 | 150-300+ | ~90 min | Board-level, market entry, when being wrong is expensive |
Rate Limits
| Scope | Limit | Window |
|---|---|---|
| All requests | 60 | 1 minute |
| All requests | 1,000 | 1 hour |
| Research creation | 10 | 1 minute |
Response Headers
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 57 X-RateLimit-Reset: 1707580800
When rate limited, the response includes a Retry-After header (in seconds) and status 429.
Error Codes
All errors return a consistent JSON shape:
{
"error": "Human-readable message",
"code": "MACHINE_READABLE_CODE",
"details": {}
}| Code | HTTP | Description |
|---|---|---|
| AUTH_MISSING_KEY | 401 | No Authorization header provided |
| AUTH_INVALID_KEY | 401 | API key not recognized |
| AUTH_PRO_REQUIRED | 403 | Active Pro subscription required |
| VALIDATION_ERROR | 400 | Request body failed validation |
| INSUFFICIENT_CREDITS | 402 | Not enough credits |
| NOT_FOUND | 404 | Resource not found or not owned by you |
| CONFLICT | 409 | Invalid state (e.g., fetching output before completion) |
| RATE_LIMITED | 429 | Too many requests (check Retry-After header) |
| INTERNAL_ERROR | 500 | Unexpected server error |