API reference
Auto-generated reference for every endpoint, every parameter, every error.
The full reference is auto-generated from our OpenAPI spec — pricing, parameters, request/response schemas, and error envelopes for every endpoint we expose. Most callers will go through the AI SDK's streamText and never touch raw HTTP, but the wire format is fully documented here for when you need it.
Endpoints
POST /v1/chat/completions
OpenAI-compatible chat. Streaming, tools, structured output, vision input. Spans every text+vision model.
POST /v1/messages
Anthropic-compatible Messages API. Use existing Anthropic SDK with our base URL.
POST /v1/embeddings
OpenAI-compatible embeddings. Vector dim varies by model — see /models.
POST /v1/responses
OpenResponses API. Coming soon.
GET /v1/models
The catalog. Returns every model your project can call.
GET /v1/models/{creator}/{model}/endpoints
Per-model details — providers, latency, throughput, uptime.
The full per-endpoint reference is being generated from our Zod schemas via fumadocs-openapi. The auto-built pages will appear under /docs/api-reference/<endpoint> once the OpenAPI spec build runs. For now, see the Quickstart and Authentication pages for working examples.
OpenAPI spec
The machine-readable spec is at https://synapse.garden/api/openapi.json. Plug it into your favorite tool (Postman, Insomnia, Stoplight, Hoppscotch) for autocomplete-driven exploration.
curl https://synapse.garden/api/openapi.json -o synapse-garden.openapi.jsonCommon request shape
Every endpoint takes:
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer mg_live_* | yes | Your API key |
Content-Type: application/json | yes for body | Omit for GET |
Idempotency-Key | optional | 24-hour dedup window |
X-Request-Id | optional | We accept yours; otherwise we generate one |
Every response includes:
| Header | Notes |
|---|---|
X-Request-Id | Unique ID — use when reporting issues |
X-RateLimit-Remaining | Tokens left in the current window |
X-RateLimit-Reset | Unix timestamp when the window rolls |
Retry-After | Seconds (only on 429) |
See Errors & retries for the full error contract.