API reference

API reference · Agents

Link the wallet an agent funds itself from

POST/v1/agents/{id}/walletAPI key

Linked only once its signature of the message proves the wallet. Deposits from it claimed for the agent, and x402 payments from it, then credit the agent. One wallet funds one live agent, and a wallet of another account funds none (409). The nonce is the one the message carried; the first attempt spends it, right or wrong.

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.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
addressrequiredstring
signaturerequiredstring
noncerequiredstring

Example

{
  "address": "string",
  "signature": "string",
  "nonce": "string"
}

Answer 200

Linked.

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".

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 404OpenAI shaped error.
  • 409OpenAI 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