Pro Plan

API Reference

Integrate deep research into your applications. Create research requests, poll for status, and retrieve structured reports via REST API.

Base URL: https://airesearchos.com/api/v1

Authentication

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

POST
/api/v1/research

Create 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

FieldTypeRequiredDescription
querystringyesResearch prompt (10-2000 characters)
modeenumyes"scan" | "dueDiligence" | "missionCritical"
reportLengthenumno"concise" | "standard" (default) | "extended"
includeSocialSourcesbooleannoInclude blogs, forums, Reddit, and social media sources. Default: true. Set to false for authoritative-only sourcing.
skipClarifyingQuestionsbooleannoSkip clarifying questions and start immediately. Default: false
clarifyingAnswersstring[]noPre-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"
}
POST
/api/v1/research/{id}/clarify

Submit 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

FieldTypeRequiredDescription
answersstring[]yesAnswers 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

GET
/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

StatusMeaning
pendingCreated, not yet started
clarifyingWaiting for clarifying question answers
queuedSent to research engine
processingResearch engine acknowledged, starting work
searchingActively searching and analyzing sources
generating_reportCompiling final report from research
completedDone - report is available
failedError occurred - credits refunded
timeoutExceeded 1-hour time limit - credits refunded
GET
/api/v1/research/{id}/output

Get 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
  }
}
GET
/api/v1/research

List 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

FieldTypeRequiredDescription
statusstringnoFilter by status (e.g., "completed", "processing")
limitnumbernoResults per page, 1-100. Default: 20
offsetnumbernoPagination offset. Default: 0
sortstringnoSort 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 }
}
GET
/api/v1/credits

Check 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

ModeCreditsSourcesTimeBest For
scan1010-20~10 minQuick validation, fact-checking
dueDiligence2550-100~30 minRoadmap decisions, competitive analysis
missionCritical100150-300+~90 minBoard-level, market entry, when being wrong is expensive

Rate Limits

ScopeLimitWindow
All requests601 minute
All requests1,0001 hour
Research creation101 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": {}
}
CodeHTTPDescription
AUTH_MISSING_KEY401No Authorization header provided
AUTH_INVALID_KEY401API key not recognized
AUTH_PRO_REQUIRED403Active Pro subscription required
VALIDATION_ERROR400Request body failed validation
INSUFFICIENT_CREDITS402Not enough credits
NOT_FOUND404Resource not found or not owned by you
CONFLICT409Invalid state (e.g., fetching output before completion)
RATE_LIMITED429Too many requests (check Retry-After header)
INTERNAL_ERROR500Unexpected server error