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. You can reveal or copy a key later from the authenticated dashboard; recoverable values are encrypted at rest.
Authorization: Bearer $SERVER4AGENT_API_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 the account's budget cap. Agents never need a human in the loop to get a server.
Budget caps
The account carries a monthly budget cap. When usage crosses it, work stops incurring further cost, so an autonomous agent can never run up a surprise bill. Webhooks fire quota.threshold at 80% and quota.cap_reached at the limit.
Key scope
Beyond the account-wide cap, an individual key can be restricted to specific servers or projects, useful when you don't want every agent to be able to reach every resource on the account. Leave the arrays empty (or omit them) and a key can reach everything.
# Restrict a key to specific servers/projects (account-level action)
curl -X PATCH https://api.server4agent.com/keys/key_3f9 \
-H "Authorization: Bearer $ACCOUNT_KEY" \
-d '{ "allowed_server_ids": ["srv_2k9"] }'Connect an agent
Create a key, paste the MCP config, and give your agent a persistent server it can build on.