API Reference
Local dev server copy
curl -O http://localhost:5173/openapi/xantly.yaml
Download
- YAML (full spec): openapi-spec.yaml
- Production base URL:
https://api.xantly.com/v1 - Local dev base URL:
http://localhost:8085/v1
curl -O http://localhost:5173/openapi/xantly.yamlImporting the spec
- Postman / Insomnia: Import from URL and paste the YAML link above.
- Hoppscotch: Collections → Import → From URL → YAML link above.
- VS Code / IntelliJ HTTP client: Add the YAML file to your workspace; tooling will offer request snippets.
- cURL/HTTPie: Use the YAML only to discover schema; requests are standard OpenAI-compatible
POST /v1/chat/completions.
Quick preview
openapi: 3.1.0
info:
title: Xantly Gateway API
version: 1.0.0
servers:
- url: https://api.xantly.com/v1
description: Production
- url: http://localhost:8085/v1
description: Local development
paths:
/chat/completions:
post:
summary: Create chat completion
head:
summary: Probe chat completion endpoint
/models:
get:
summary: List available models
/embeddings:
post:
summary: Create embeddings
components:
schemas:
ChatCompletionRequest: {...}
ChatCompletionResponse: {...}
XantlyOrchestration: {...}
XantlyMetadata: {...}
EmbeddingRequest: {...}
EmbeddingResponse: {...}
ListModelsResponse: {...}What’s included
POST /chat/completionsandHEAD /chat/completionsGET /models— dynamic catalog listingPOST /embeddings— vector embedding generation- Full request/response schemas, including Xantly extensions:
routing_hints,routing_override,xantlyorchestration block- Complete
xantly_metadatawith cost, savings, routing visibility, and BYOK attribution - Voice, memory, caching, reliability, tool-calling, and streaming options
- 402 Payment Required for quota/budget exceeded scenarios
- Error schema aligned with OpenAI-compatible shape
Change management
- Source of truth is the live YAML linked above (kept in sync with backend and docs).
- If you need a pinned version, download the YAML and commit it to your client repo.