API reference

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

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe agent's id; self on an agent's own key where the route allows it.

Answer 200

The agent.

Fields of the 200 answer
FieldTypeWhat it is
objectstringOne of "agent".
idinteger
namestring
statusstringOne of "active", "paused".
createdintegerUnix seconds.
expires_atinteger or null
expiredboolean
modelsarray of string or null
max_cost_per_request_microsinteger or null
daily_cap_microsinteger or null
auto_refillobject or null
auto_refill.amount_microsrequiredintegerMove at least this much per refill. At least 1.
auto_refill.daily_max_microsrequiredintegerNever refill more than this per UTC day. At least 1.
wallet_addressstring or null
keyobject or null
key.idinteger
key.prefixstring
key.last_used_atinteger or null
balance_microsintegerSpendable: open holds taken off.
held_microsinteger
spent_today_microsintegerToday's settled spend plus open holds: what the daily cap counts.
refilled_today_microsinteger
currencystringOne of "USD".
spend_by_dayarray of object
spend_by_day[].daystring
spend_by_day[].requestsinteger
spend_by_day[].cost_microsinteger
spend_by_modelarray of object
spend_by_model[].modelstring
spend_by_model[].requestsinteger
spend_by_model[].cost_microsinteger
recent_requestsarray of object
recent_requests[].idstring or null
recent_requests[].createdinteger
recent_requests[].modelstring
recent_requests[].statusinteger
recent_requests[].prompt_tokensinteger
recent_requests[].completion_tokensinteger
recent_requests[].cost_microsinteger
transfersarray of object
transfers[].kindstringOne of "agent_fund", "agent_refill", "agent_return", "deposit".
transfers[].microsintegerSigned, from the agent's side.
transfers[].createdinteger

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.

Antimatter