REST API
Direct HTTP access without an SDK.
Every SDK method maps to a REST endpoint on the API gateway. Base URL: https://api.caedral.com (production) or http://localhost:5001 (local). Authenticate mutating /v1 routes with Authorization: Bearer and a cd_live_ key. Optional JSON field notre on POST /v1/chat/completions only; the gateway strips it before upstream. Notre does not apply to embeddings, rerank, voice, or images.
| Method | Endpoint | Auth |
|---|---|---|
| GET | /health | None |
| GET | /v1/models | None |
| GET | /v1/models/:modelId | None |
| POST | /v1/chat/completions | Bearer API key |
| GET | /v1/usage | Bearer API key |
| POST | /v1/images/generations | Bearer API key |
| POST | /v1/embeddings | Bearer API key |
| POST | /v1/audio/speech | Bearer API key |
| POST | /v1/audio/transcriptions | Bearer API key |
| POST | /v1/rerank | Bearer API key |
Chat completion (curl)
curl https://api.caedral.com/v1/chat/completions \ -H "Authorization: Bearer $CAEDRAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-4.5", "messages": [ { "role": "user", "content": "Explain rate limiting in one paragraph." } ] }'Embeddings (curl)
curl https://api.caedral.com/v1/embeddings \ -H "Authorization: Bearer $CAEDRAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"caedral-embed","input":"Hello world"}'Image generation (curl)
curl https://api.caedral.com/v1/images/generations \ -H "Authorization: Bearer $CAEDRAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"caedral-vision","prompt":"A sunset over mountains"}'Usage summary (curl)
curl https://api.caedral.com/v1/usage \ -H "Authorization: Bearer $CAEDRAL_API_KEY"