API Reference
Auto-generated
Research
API reference for research endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/research
GET
/api/v1/researchList your research jobs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | limitDefault: 20 |
| cursor | string | Optional | cursor |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"items": [],
"next_cursor": "example"
}GET /api/v1/research/{job_id}
GET
/api/v1/research/{job_id}Get a research job
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/<job_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"status": "example",
"effort": "example",
"budget": "example",
"cost": "example",
"tool_calls": 0
}DELETE /api/v1/research/{job_id}
DELETE
/api/v1/research/{job_id}Delete a finished research job
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/research/<job_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/research/{job_id}/approve
POST
/api/v1/research/{job_id}/approveApprove the plan and start the run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
| plan | object | Optional | plan |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/<job_id>/approve \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"status": "example",
"effort": "example",
"budget": "example",
"cost": "example",
"tool_calls": 0
}POST /api/v1/research/{job_id}/cancel
POST
/api/v1/research/{job_id}/cancelCancel a research job
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/<job_id>/cancel \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"status": "example",
"effort": "example",
"budget": "example",
"cost": "example",
"tool_calls": 0
}GET /api/v1/research/{job_id}/events
GET
/api/v1/research/{job_id}/eventsStream research progress (SSE, resumable)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
| last_event_id | string | Optional | last_event_id |
| Last-Event-ID | string | Optional | Last-Event-ID |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/<job_id>/events \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/research/{job_id}/plan
GET
/api/v1/research/{job_id}/planGet the plan of a plan_first job
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/<job_id>/plan \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}PUT /api/v1/research/{job_id}/plan
PUT
/api/v1/research/{job_id}/planRefine the plan before approving it
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
| plan | object | Required | Plan |
Request Example
Bash
curl -X PUT https://api.alterlab.io/api/v1/research/<job_id>/plan \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan": "..."
}'Response Example
JSON
{
"id": "example",
"status": "example",
"effort": "example",
"budget": "example",
"cost": "example",
"tool_calls": 0
}POST /api/v1/research/{job_id}/rerun
POST
/api/v1/research/{job_id}/rerunStart a new research job from a stored one
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | Required | job_id |
| overrides | object | Optional | Overrides |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/<job_id>/rerun \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}