Skip to main content
POST
Authenticate with Authorization: Bearer sk_live_... on https://api.agent37.com.

Request body

The examples include every optional field. Omit any field to use its default.
string
default:"agent37-base"
optional
A system or workspace template name. Defaults to agent37-base, a plain Linux sandbox with no agent; pass an agent template such as agent37-hermes for the Agent API. Add @<version> to pin a published release. See Template selection for harness requirements and version rules.
object
optional
The instance shape, for example { "cpu": 2, "memory": 4, "disk": 6 }. Omitted, most templates use 2 vCPU / 4 GB. agent37-ubuntu defaults to 2 vCPU / 4 GB / 12 GB disk; agent37-android defaults to 4 vCPU / 8 GB / 12 GB disk. Both require "type": "vm". See Instance sizing for the four available shapes. 4 vCPU is the ceiling on every type: a request for more cores keeps the memory it asked for and comes back with 4 vCPU at that shape’s price. Disk is any whole number of GB within the shape’s range. When omitted, it defaults to 12 GB for these two VM templates, or 4, 6, 12, or 24 GB by shape for other templates. Any other combination returns 400 invalid_request listing the valid shapes.
string
default:"default"
optional
default is used when you omit type, and for most harnesses it is all you need. performance is a whole machine with its cores held for it, for heavy work such as computer use, at 4x the default compute rate; it needs a funded workspace and takes longer to create, since it boots a kernel. See Default and Performance instances.vm is a whole virtual machine with its own kernel, for Docker, Kubernetes, databases, and Android emulators, at 2.5x the default compute rate. It needs a funded workspace. See VM instances.
string
default:"us"
optional
Where the instance runs: us, eu (France), or ap-south (India, Mumbai). The price is the same in all three.The region is fixed for the life of the instance. Every later operation honours it: a stop and start, a wake, a resize that has to move the instance to another host, and a restore all keep it on the same continent. A resize body carrying region returns 400 invalid_request. To move region, create a new instance there and copy the data over (a backup and a restore is the usual way).There is no fallback. If the region you asked for has no room for the shape you asked for, the create returns 503 no_capacity rather than placing the instance somewhere else.eu and ap-south run the instance, its disk, and everything your code writes to that disk in that region. Backups and the instance’s own control-plane record (its id, shape, and status) are stored in the US; if that matters for your use case, email vishnu@agent37.com before you build on it.us is the only region that runs every instance type. eu and ap-south run VM and Performance instances, so a create in either should also send "type": "vm" or "type": "performance". A default create there returns 400 invalid_request, and the message says so.
string
optional
A label for the instance.
object
optional
Your own key/value pairs. Stored, never interpreted.
object
optional
Environment variables for the container, as string key/value pairs. Set once at create and replayed on every restart, update, and wake. Any number of entries, each under 128 KB and 256 KB in total; keys are uppercase letters, digits, and underscores starting with a letter; values are strings. See Environment variables.
object
optional
Caps on this instance’s managed usage (managed LLM, Brave search, and Composio calls), in micros (millionths of a dollar): monthly_cap_micros resets each UTC month, credit_micros adds one-time headroom that persists until spent. Both default to 0, so managed calls are refused until you raise one. These are ceilings, not money; spend still draws the workspace wallet. See Budgets.
boolean
default:"false"
optional
Opt the instance into auto-sleep: once no bytes have moved through its URLs for idle_timeout_seconds, it is checkpointed to sleeping and bills disk alone until a request wakes it. Awake minutes bill the ordinary compute rate.
integer
default:"900"
optional
How long the instance must be idle before it sleeps, in seconds. An integer from 300 to 86400 (five minutes to one day). Only meaningful with auto_sleep: true.
object[]
optional
Ports to expose at permanent unauthenticated URLs, each { port, prefix?, label? }, for webhooks and other callers that can’t send a credential. See Public ports, or follow the end-to-end Hermes webhook setup for port 8644.
string | object
default:"allow-all"
optional
Where the instance can connect: "allow-all" (the public internet), "deny-all" (nothing, DNS included), or { "allow": [...] } with up to 100 domains and IPv4 addresses and ranges. See Network access.
string
optional
The folder the instance’s disk is mounted at, and the one folder an update keeps. Set it when your image keeps its data somewhere else, like /data or /var/lib/postgresql. Any absolute path except /. Fixed for the life of the instance, even when an update moves it onto an image that runs as a different user. Defaults to the image user’s home folder: /home/node on every system template, /root for an image that runs as root. Anything the image itself ships in that folder is hidden by the disk.

Defaults

POST /v1/instances returns 201 with the full instance object once status is running. Every field is optional, so a POST with no body works: you get the default template (agent37-base) on the smallest shape, 2 vCPU / 4 GB.

Funding and readiness

Creating an instance requires one day of compute at its running rate in your workspace wallet, but debits nothing: the balance check is the create gate (below it, the create fails with 402 insufficient_balance and nothing is provisioned), and the meter only starts when the instance first reaches running. How many instances the workspace can run at once is set by your instance limit, which rises as you top up; sleeping and stopped instances do not count once you have topped up. See Billing. For agent templates, set a managed-service budget before using the managed model. The default budget is zero; shell commands do not need managed-model spending. On an agent template, poll GET /v1/health on the returned url until healthy is true, then send a message. running means the computer is up; the agent can still be booting. Follow Send your first agent message for the complete agent setup. For shell commands and services, start with the Quickstart.

Response

201 with the full instance object. The example response shows only id, status, and url.

Template selection

A template name. agent37-base (a plain Linux sandbox with Node, Python, git, build tools, and a terminal, with no agent) is the default; agent37-hermes (full Hermes, with a headless browser), agent37-openclaw (OpenClaw, with a headless browser), agent37-claude-code (Claude Code, which needs your own Anthropic account connected before chat turns work), agent37-codex (Codex, which needs your own OpenAI account connected before chat turns work), agent37-grok (Grok, which needs your own xAI API key set before chat turns work), agent37-opencode (OpenCode, which runs on the managed model out of the box), agent37-pi (Pi, the minimal harness, also on the managed model out of the box), and agent37-n8n (n8n, a workflow automation web app with no chat API; its editor gets a public URL on create) are the other system templates. You can also pass one of your own workspace templates by name. Any name takes an optional @<version> to pin a published release: a tag on system templates (agent37-hermes@<tag>), a revision number on workspace templates (my-agent@2). Pin when your creates must be reproducible; the bare name follows the latest release. Unknown names and unpublished versions return 400 invalid_request. Direct image references are rejected with 400: register a template first, then pass its name.

Capacity and limit errors

See Errors for the full catalog and the error envelope.