GET /v1/lab/credits/usage
The caller’s Lab AI usage for the current allowance period (else the last 30 days): credits spent per UTC day (every day, 0 included), the period’s total, the 20 costliest chats (title, Deep mode or not, credits, model calls, last use; a deleted chat keeps its cost with a null title) and how long the caller’s backtests of the last 7 days waited in the queue.
The caller’s Lab AI usage for the current allowance period (else the last 30 days): credits spent per UTC day (every day, 0 included), the period’s total, the 20 costliest chats (title, Deep mode or not, credits, model calls, last use; a deleted chat keeps its cost with a null title) and how long the caller’s backtests of the last 7 days waited in the queue.
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/credits/usage"{ "period_start": "string", "period_end": "string", "daily": [ { "day": "string", "credits": -9007199254740991 } ], "spent_period": -9007199254740991, "conversations": [ { "id": "string", "title": "string", "deep": true, "credits": -9007199254740991, "calls": -9007199254740991, "last_at": "string" } ], "queue": { "runs_7d": -9007199254740991, "wait_median_s": 0, "wait_max_s": 0 }}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "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", "running": 0, "limit": 0, "issues": [ null ], "trace_id": "string"}GET /v1/lab/credits/history GET
The caller’s last 100 credit movements, newest first: allowance grants and expiries, top-up purchases and expiries, each question’s charge, refunds and adjustments.
GET /v1/lab/credits GET
The caller’s Lab AI credits (1 credit = $0.01 of real model cost): what is left of this period’s allowance (spent first), purchased top-ups, the total, when the allowance resets (`period_end`; unused allowance does not roll over), what a typical question costs (`typical_turn_credits`), the reserve a question needs (25), the caller’s own daily ceiling and today’s spend, whether a question may start now (`blocked`), the plan’s model and whether it has Deep mode (the deep model for a whole conversation, about twice the credits), the two modes as the app names them (`modes`), the top-up packs with their volume bonus and the custom amount’s range.