Skip to content
DocsAPI ReferenceREST API

REST API

Complete REST API reference for Mosaic Stack.

REST API#

The Mosaic Gateway exposes an OpenAI-compatible REST API. All endpoints are available under /v1.

Chat Completions#

bash
curl -X POST http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer $MOSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

List Models#

bash
curl http://localhost:8080/v1/models \
  -H "Authorization: Bearer $MOSAIC_API_KEY"

Response Format#

All responses follow the standard OpenAI response format with additional x-mosaic-* headers for routing metadata.