Getting started
Authentication
Every request is authenticated with a bearer API key. There is no plan field anywhere in the provisioning flow, limits come from the account behind the key.
API keys
Issue a key per agent (or share one across agents) from your dashboard. The agent sends it as a bearer token on every request.
header
Authorization: Bearer $AGENTSERVER_KEYWho does what
Agents provision and drive servers on their own, they create servers, run tasks, manage files, and deploy. The account behind the key handles billing, issues and revokes keys, and sets spend caps. Agents never need a human in the loop to get a server.
Spend caps
Each key carries a monthly spend cap. When an agent reaches it, that key stops incurring usage, so an autonomous agent can never run up a surprise bill.
set-cap.sh
# Set a spend cap on a key (account-level action)
curl -X PATCH https://api.server4agent.com/keys/key_3f9 \
-H "Authorization: Bearer $ACCOUNT_KEY" \
-d '{ "monthly_spend_cap_usd": 50 }'