Skip to navigation

API reference

Astropods REST API for agents, deployments, and accounts
View as Markdown

The Astropods API is the API the ast CLI and the Astropods dashboard use. Every endpoint they call is in this reference.

Base URL

https://astropods.com/api/v1

Endpoint paths in this reference include the /api/v1 prefix.

WebSocket endpoints, such as a sandbox terminal, use the same host over wss://.

Authentication

Send a bearer token in the Authorization header:

Authorization: Bearer <token>
CallerToken
You, from the CLI or a scriptYour access token. Run ast login to get one; the CLI sends it for you.
An agent, calling back to AstropodsThe deployment’s token, available to the agent as ASTRO_AUTHZ_TOKEN.

Each endpoint lists the token it accepts. A few endpoints, such as listing public agents, need no token.

Errors

A failed request returns a JSON body:

{
"error": "agent not found"
}

error describes the failure. Some endpoints add details with more context, and a code you can match on.