Rates
All money fields are integer micros: USD x 1,000,000, so $1.00 is
1000000. Managed spend debits the workspace wallet, the same wallet that pays for compute. Top it up at agent37.com/dashboard/cloud/billing.
The managed model
Those credentials reach the agent as environment variables on the instance, which is what makes them work in a custom image too. The instance’s starter token,AGENT37_MANAGED_TOKEN, authorizes managed-service calls that spend wallet credit within this budget. Your sk_live_... workspace key manages the budget itself. Managed services shows the setup.
Managed LLM calls default to the Agent37 default model, a fast low-cost model we pick and keep current. You are not locked to it: the managed provider is OpenAI-compatible and lists its supported paid, tool-capable OpenRouter models at GET https://api.agent37.com/llm/v1/models. In Hermes, run /model and pick from the Agent37 provider’s list. In OpenClaw, run openclaw models list and set any agent37/... entry as the model. Whatever the model, billing stays the same: OpenRouter inference cost passed through with no Agent37 markup, metered against the budget and wallet.
How budgets work
A budget has two parts:- Monthly cap. A spending ceiling that resets at the start of each UTC month. It defaults to $0, so managed calls are refused until you grant headroom.
- One-time credit. A ceiling that persists across months and is consumed only after the monthly portion is exhausted.
Budget figures are ceilings, not money. The workspace wallet is the only pot of dollars; raising a cap or topping up an instance moves no funds. The sum of caps across your instances can exceed the wallet balance, which is fine: caps bound each instance, the wallet bounds the total.
Set a budget at create
Passbudget in the create body to grant headroom from the first call.
integer
default:"0"
optional
Monthly managed-spend cap in micros. Resets each UTC month.
integer
default:"0"
optional
One-time headroom in micros. Persists until consumed.
Endpoints
All three budget endpoints return the same budget object.
The budget object
integer
The monthly spending ceiling.
integer
Managed spend counted against the cap this month.
integer
monthly_cap_micros minus monthly_consumed_micros, floored at 0.string
The UTC month the counters cover, formatted
YYYY-MM.integer
One-time headroom left. Consumed only after the monthly portion is exhausted.
integer
Epoch seconds of the last budget write. The budget is first written when the instance is created; cap changes, top-ups, and managed spend all update it.
Set the monthly cap
PATCH /v1/instances/{id}/budget sets the cap for the current and future months. It takes effect immediately.
integer
required
The new monthly cap in micros. Must be a non-negative integer.
0 turns managed services off for the instance once any remaining top-up headroom is consumed.
Add one-time headroom
POST /v1/instances/{id}/budget/top-up adds to credit_remaining_micros. Use it for a burst of work you don’t want to bake into the monthly cap.
integer
required
Headroom to add, in micros. Must be a positive integer.
string
optional
Up to 64 characters matching
^[A-Za-z0-9_-]{1,64}$. Repeating a request with the same key returns the current budget without adding again, so retries are safe.Read managed spend
GET /v1/instances/{id}/usage?month=YYYY-MM returns the instance’s managed-spend rollup for one UTC month. Omit month for the current month; an invalid value returns 400.
string
The UTC month covered, formatted
YYYY-MM.integer
Total managed spend for the month.
object
Per-service breakdown.
llm carries cost_micros, calls, input_tokens, and output_tokens; brave, composio, and perflo carry cost_micros and calls. perflo is paid tools.This endpoint covers managed spend on one instance. For everything the workspace spent, compute included, by day and by instance, use
GET /v1/usage. See Billing.When a managed call is refused
A managed call that can’t be covered fails with a 402 carrying one of two reasons. The instance keeps running either way; only managed calls are refused, and the refusal surfaces inside the instance on the call the agent was making, so the agent typically reports it in its reply.
For the Sandbox API error catalog, see Errors.