Chat Completions
OpenAI-compatible chat completions endpoint. Supports both streaming (SSE) and non-streaming responses. **Routing modes** — controlled by the `model` + `agent` fields: - **Gateway mode** (`agent` omitted): pure LLM proxy, no system prompt, no tools. Rate limiting and budget enforcement still apply. - **Orchestrator mode** (`agent: "asteria"`): full Asteria agent with RAG, web search, code execution, and sub-agents. - **Custom agent mode** (`agent: "<slug>"`): invoke a shared custom agent by slug. The agent's system prompt and tools are applied.
Authorization
ApiKey Your API key (sk-ast-...)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.asteria-labs.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "string" } ] }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "asteria",
"choices": [
null
],
"usage": null,
"thread_id": "string"
}{
"error": null
}{
"error": null
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Cookbooks
Integration recipes for common Asteria use cases — drop-in replacement, shared agents, Power Automate, and programmatic project setup.
List Models
List models available to this project. Returns org-enabled models intersected with the project allow-list (if set). Follows Anthropic's model list shape: {data, first_id, last_id, has_more}. Does not include 'asteria' or agent slugs — use GET /v1/agents for those.