API Reference
Asteria API overview — authentication, routing modes, and endpoint index.
Base URL
https://api.asteria-labs.com/v1Authentication
All /v1/ requests require a Bearer token in the Authorization header.
Two key types exist with different scopes:
| Key prefix | Scope | Used for |
|---|---|---|
sk-ast-... | Project | Chat completions, model/agent discovery |
sk-ast-adm-... | Admin | /v1/organization/ management routes |
Project keys are created per-project in the platform. Admin keys are created by org admins in Settings → Admin API Keys.
Routing modes
POST /v1/chat/completions supports three modes controlled by model + agent:
model | agent | Mode | Behavior |
|---|---|---|---|
| (omitted) | (omitted) | Gateway | Pure LLM proxy on your organization's default chat model |
"claude-opus-4-6" | (omitted) | Gateway | Pure LLM proxy — no system prompt, no tools |
| (omitted) | "asteria" | Orchestrator | Full Asteria agent on the organization's default chat model |
"claude-opus-4-6" | "asteria" | Orchestrator | Full Asteria agent with RAG, web search, code execution |
"gpt-4o" | "hr-bot-h26dx" | Custom agent | Shared custom agent by slug |
Both fields are optional. agent selects the agent layer; model pins a specific
model, and omitting it uses your organization's default chat model — so you can send
a first request without looking up a model id. If the organization has no default
chat model configured, an omitted model returns 400 invalid_request_error
("No default chat model is configured for this organization").
Quick example
curl -X POST https://api.asteria-labs.com/v1/chat/completions \
-H "Authorization: Bearer sk-ast-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent": "asteria",
"messages": [{"role": "user", "content": "Summarize our Q4 board deck"}]
}'Endpoint index
Chat & Discovery (project key)
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Chat completions — gateway, orchestrator, or custom agent |
GET | /v1/models | List models available to your project |
GET | /v1/agents | List agents callable by your project |
Organization management (admin key)
| Method | Path | Description |
|---|---|---|
GET | /v1/organization/users | List org members |
GET/PATCH/DELETE | /v1/organization/users/:id | Retrieve, update role, or remove user |
GET/POST | /v1/organization/invites | List or create pending invitations |
GET/DELETE | /v1/organization/invites/:id | Retrieve or cancel invitation |
GET/POST | /v1/organization/projects | List or create projects |
GET/PATCH/DELETE | /v1/organization/projects/:id | Retrieve, update, or archive project |
GET/POST | /v1/organization/projects/:id/api-keys | List or create project API keys |
GET/DELETE | /v1/organization/projects/:id/api-keys/:key-id | Retrieve or revoke key |
GET/POST | /v1/organization/projects/:id/users | List or add project members |
GET/PATCH/DELETE | /v1/organization/projects/:id/users/:uid | Retrieve, update role, or remove member |
GET/POST | /v1/organization/admin-keys | List or create admin API keys |
DELETE | /v1/organization/admin-keys/:id | Revoke admin key |
GET | /v1/organization/usage | Org-wide usage summary |
GET | /v1/organization/projects/:id/usage | Per-project usage summary |
GET | /v1/organization/audit-logs | Org-wide audit log (cursor-paginated) |