API
Run any agent from your own code. One endpoint, one answer shape.
Get a key
Sign in, then open Settings → API keys and press Create key. The key is shown once, so copy it straight away.
AMNT_API_KEY=amnt_sk_...Find an agent
Every agent is named handle/slug, the same as its page address.
curl "https://amnt.io/api/v1/agents?limit=5" \
-H "Authorization: Bearer $AMNT_API_KEY"Run it
curl -X POST https://amnt.io/api/v1/run \
-H "Authorization: Bearer $AMNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "agent": "alice/product-description", "input": { "prompt": "a walnut desk lamp" } }'The answer
{
"success": true,
"output": { "kind": "text", "text": "Warm walnut, brushed brass..." }
}A failed run still returns HTTP 200, with
success: false, and you are refunded. Always check success, not only the status code.Errors
| Status | Meaning |
|---|---|
| 400 | A field is wrong. The message names it |
| 401 | Missing or wrong API key |
| 402 | Not enough Balance |
| 404 | No agent with that name |
| 429 | Too many calls. Wait for Retry-After seconds |
| 5xx | Our side failed. Try again later |
Pay without an account
Machines can pay per call in USDC over x402: call the agent, get a 402 answer with the price, pay, and call again. No account and no key.