64 docs indexed
All routes handled by the obleth data plane (:8080), authentication requirements, and passthrough behavior.
The data plane listens on port 8080 and proxies OpenAI-compatible requests to the configured upstream. All routes require a valid API key in the Authorization header.
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Chat completions (streaming and non-streaming) |
POST | /v1/completions | Legacy text completions |
POST | /v1/responses | Responses API (model_type: chat) |
POST | /v1/embeddings | Embeddings (model_type: embedding) |
POST | /v1/audio/transcriptions | Speech-to-text, multipart upload (model_type: audio_transcription) |
POST | /v1/audio/translations | Speech translation, multipart upload (model_type: audio_transcription) |
POST | /v1/audio/speech | Text-to-speech (model_type: audio_speech) |
POST | /v1/images/generations | Image generation (model_type: image) |
POST | /v1/images/edits | Image edits (model_type: image) |
POST | /v1/images/variations | Image variations (model_type: image) |
GET | /v1/models | Proxied to upstream — returns the upstream's model list |
GET | /health | Liveness probe (no auth required) |
All other paths are forwarded to the upstream as-is (passthrough). This means vendor-specific extensions like /v1/batch or /v1/files work without any obleth configuration.
Routes that require a registered model resolve by the request model field
against the model registry: /v1/chat/completions, /v1/completions,
/v1/responses, /v1/embeddings, /v1/audio/transcriptions,
/v1/audio/translations, /v1/audio/speech, and the /v1/images/* routes. Only
chat routes participate in auto model routing. See
Multi-modal Models.
Audio transcription/translation clients send multipart/form-data with the
audio file. obleth parses the multipart body, rewrites the model field to the
route's upstream_model, rebuilds the form, and forwards the file part
unchanged.
obleth appends the client's request path to the model's api_base. Configure
api_base as the provider base ending in /v1 (not a full endpoint URL) to
avoid a doubled path such as .../v1/embeddings/v1/embeddings. When a model
defines multiple endpoints, the selected endpoint's api_base is used the same
way. See Reliability & Failover.
Every request (except /health) must include:
Authorization: Bearer sk_<48 hex chars>
The key is resolved as described in the Authentication reference.
429 if exceeded)403 if exhausted)Authorization replaced with the selected endpoint's (or model's) api_key (if set)For non-token modalities, cost is computed from the response shape instead of
token usage: image routes bill n × cost_per_image, and text-to-speech bills
input characters × cost_per_character. Embeddings bill prompt tokens via
input_cost_per_token. See Multi-modal Models.
obleth forwards client headers except hop-by-hop, auth, and encoding headers:
hostcontent-lengthauthorizationx-api-keyaccept-encodingconnectionWhen cache is enabled for a model, the data plane:
SHA-256(model + request_body) before forwardingobleth:cache:{hash} in Redis200 responses up to 512 KiB with the model's cache_ttl_secsCache hits include X-Obleth-Cache: hit. Misses continue through the normal streaming path and are recorded in the usage ledger as cache_status = "miss".