API reference · Agents
One agent, with its last thirty days
GET/v1/agents/{id}API key
Balance, spend by day and by model from the meter, its last requests and its transfers. An agent's own key may read itself as /v1/agents/self.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The agent's id; self on an agent's own key where the route allows it. |
Answer 200
The agent.
| Field | Type | What it is |
|---|---|---|
| object | string | One of "agent". |
| id | integer | |
| name | string | |
| status | string | One of "active", "paused". |
| created | integer | Unix seconds. |
| expires_at | integer or null | |
| expired | boolean | |
| models | array of string or null | |
| max_cost_per_request_micros | integer or null | |
| daily_cap_micros | integer or null | |
| auto_refill | object or null | |
| auto_refill. | integer | Move at least this much per refill. At least 1. |
| auto_refill. | integer | Never refill more than this per UTC day. At least 1. |
| wallet_address | string or null | |
| key | object or null | |
| key. | integer | |
| key. | string | |
| key. | integer or null | |
| balance_micros | integer | Spendable: open holds taken off. |
| held_micros | integer | |
| spent_today_micros | integer | Today's settled spend plus open holds: what the daily cap counts. |
| refilled_today_micros | integer | |
| currency | string | One of "USD". |
| spend_by_day | array of object | |
| spend_by_day[] | string | |
| spend_by_day[] | integer | |
| spend_by_day[] | integer | |
| spend_by_model | array of object | |
| spend_by_model[] | string | |
| spend_by_model[] | integer | |
| spend_by_model[] | integer | |
| recent_requests | array of object | |
| recent_requests[] | string or null | |
| recent_requests[] | integer | |
| recent_requests[] | string | |
| recent_requests[] | integer | |
| recent_requests[] | integer | |
| recent_requests[] | integer | |
| recent_requests[] | integer | |
| transfers | array of object | |
| transfers[] | string | One of "agent_fund", "agent_refill", "agent_return", "deposit". |
| transfers[] | integer | Signed, from the agent's side. |
| transfers[] | integer |
Errors
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.