Polyrankdocs
ApiLab

GET /v1/lab/agent

Whether the caller’s plan includes the Strategy Lab assistant, its budget per UTC day and today’s spend (USD), how many more questions today’s allowance covers at the caller’s median question cost before today (`est_questions_left`, which never rises within a day), today’s spend as a share of the allowance (`used_pct_of_today`), when it resets (`resets_at`, the next midnight UTC), the model, and the notes the page shows with it. 404 `lab_agent_disabled` while LAB_AGENT_ENABLED is off.

GET
/v1/lab/agent

Whether the caller’s plan includes the Strategy Lab assistant, its budget per UTC day and today’s spend (USD), how many more questions today’s allowance covers at the caller’s median question cost before today (est_questions_left, which never rises within a day), today’s spend as a share of the allowance (used_pct_of_today), when it resets (resets_at, the next midnight UTC), the model, and the notes the page shows with it. 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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/lab/agent"
{  "allowed": true,  "budget_usd": 0,  "spent_today_usd": 0,  "est_questions_left": -9007199254740991,  "used_pct_of_today": 0,  "resets_at": "string",  "model": "string",  "notes": [    "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"}