API reference
Authentication, endpoints and request examples for the MultiVibe edge.
On this page
The MultiVibe edge exposes OpenAI Responses, Chat Completions and Anthropic Messages under /v1 and at the root. The model IDs in examples are placeholders; read GET /v1/models first.
#Authentication
PROXY_API_KEY, an application key, Bearer token or x-api-key/admin/*x-admin-token or Bearer admin tokenCODEX_PROJECT_REGISTRATION_TOKEN through x-codex-project-token/health and static assetsApplication keys isolate traces and deferred jobs. They share the provider account pool and quota state.
#Endpoints
GET/v1/models, /v1/models/:idPOST/v1/responsesPOST/v1/responses/compactPOST/v1/chat/completionsPOST/v1/messagesPOST/v1/realtime/callsGET/v1/realtime/voices, /v1/settings/voicesGET/v1/capacity, /v1/capacity/eventsGET/DELETE/v1/jobs/*The same inference and model routes are exposed without /v1. Discovery compatibility includes /api/v1/models, /api/tags, /version, /props and /v1/props.
#Responses
curl -X POST http://localhost:1455/v1/responses \
-H "Authorization: Bearer $MULTIVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model",
"input": "Explain quota-aware routing in one sentence."
}'
Add "stream": true and use curl -N for SSE.
#Chat Completions
curl -X POST http://localhost:1455/v1/chat/completions \
-H "Authorization: Bearer $MULTIVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model",
"messages": [{"role": "user", "content": "Hello"}]
}'
#Anthropic Messages
curl -X POST http://localhost:1455/v1/messages \
-H "x-api-key: $MULTIVIBE_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Hello"}]
}'
MultiVibe maps Anthropic text, images, tools, tool results, usage, errors and stream events to the selected upstream dialect.
#Responses over WebSocket
Connect to ws://localhost:1455/v1/responses, authenticate during the upgrade, and send Codex-style response.create frames. WebSocket transport is available for /responses only.
Browser WebSocket clients cannot attach the authorization header during the handshake; use a server-side client.
#Realtime voice
The edge proxies the multipart SDP handshake, then audio flows directly over WebRTC. By default it selects an eligible OpenAI/ChatGPT account.
REALTIME_PROVIDER=openai
To use a billed OpenAI-compatible Realtime API account:
REALTIME_PROVIDER=openai-compatible
REALTIME_WEBRTC_CALL_URL=https://api.openai.com/v1/realtime/calls
This mode is never selected silently as a fallback from a ChatGPT subscription.
#Response headers
Inference responses may include:
X-MultiVibe-DecisionX-MultiVibe-PriorityX-MultiVibe-Resolved-ModelX-MultiVibe-Idempotency-Status
#Deferred jobs
Send X-MultiVibe-Execution: defer with an optional priority, deadline, idempotency key and webhook ID. The response is 202 Accepted with a multivibe.job.
curl -X POST http://localhost:1455/v1/responses \
-H "Authorization: Bearer $MULTIVIBE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-MultiVibe-Priority: batch" \
-H "X-MultiVibe-Execution: defer" \
-H "X-MultiVibe-Idempotency-Key: nightly-translation-42" \
-d '{"model":"your-model","input":"..."}'
See Routing for job routes and replay behavior.
#Errors
400401403404409429502503The exact body follows the selected dialect. Log the status, the request id and the short error message; do not log credentials or full prompts.