Polyrankdocs
ApiLab

POST /v1/lab/agent/conversations

Start an assistant conversation with its first message; answers 202 with the conversation (status queued) — poll GET /lab/agent/conversations/:id. Signed-in session only. 403 `plan_required` (feature `agent`: Quant and above); 429 `lab_agent_budget` once today’s allowance is used (Retry-After = seconds to midnight UTC); 429 `lab_agent_busy` while another of the caller’s conversations is answering. 404 `lab_agent_disabled` while LAB_AGENT_ENABLED is off.

POST
/v1/lab/agent/conversations

Start an assistant conversation with its first message; answers 202 with the conversation (status queued) — poll GET /lab/agent/conversations/:id. Signed-in session only. 403 plan_required (feature agent: Quant and above); 429 lab_agent_budget once today’s allowance is used (Retry-After = seconds to midnight UTC); 429 lab_agent_busy while another of the caller’s conversations is answering. 404 lab_agent_disabled while LAB_AGENT_ENABLED is off.

AuthorizationBearer <token>

API key: Authorization: Bearer pk_live_… (mint at polyrank.app/api-keys)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/lab/agent/conversations" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{  "id": "string",  "title": "string",  "status": "idle",  "error": "string",  "model": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}