API reference · Agents
Change an agent's name, policy or status
PATCH/v1/agents/{id}API key
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. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| name | string | At most 60 characters. |
| status | string | Paused refuses the agent's next request at every door. One of "active", "paused". |
| models | array of string or null | Model ids and autopilot ids the agent may name; null is any. An autopilot id routes across the catalog as usual. A list of models only is also the key's allowlist. |
| max_cost_per_request_micros | integer or null | Refuse a request whose worst case is over this (403 request_cost_exceeded). |
| daily_cap_micros | integer or null | Settled spend plus open holds in one UTC day never passes this (429 agent_daily_cap_reached). |
| expires_at | integer or null | Unix ms. The agent and its key stop here. |
| 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. |
Example
{}Answer 200
Changed.
| 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". |
Errors
- 400OpenAI shaped error.
- 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.