MultiVibe Docs Download Host

API reference

Authentication, endpoints and request examples for the MultiVibe edge.

Updated 2 min readMarkdown
dashboard / API referencedemo data
API reference view in the MultiVibe demo dashboard with fictional data
The built-in API workspace with a /v1/responses request. Fictional demo data. Open full size
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

Surface Credential Inference, jobs, capacity, Realtime and WebSocket PROXY_API_KEY, an application key, Bearer token or x-api-key Dashboard and /admin/* Administrator session, x-admin-token or Bearer admin token Codex project registration CODEX_PROJECT_REGISTRATION_TOKEN through x-codex-project-token /health and static assets Unauthenticated

Application keys isolate traces and deferred jobs. They share the provider account pool and quota state.

#Endpoints

Method Endpoint Purpose GET /v1/models, /v1/models/:id Discovered models and enabled aliases POST /v1/responses OpenAI Responses; JSON, SSE or WebSocket POST /v1/responses/compact Responses compaction POST /v1/chat/completions Chat Completions; JSON or SSE POST /v1/messages Anthropic Messages compatibility; JSON or SSE POST /v1/realtime/calls Realtime WebRTC SDP negotiation GET /v1/realtime/voices, /v1/settings/voices Voice eligibility and catalog GET /v1/capacity, /v1/capacity/events Capacity snapshot and resumable SSE GET/DELETE /v1/jobs/* Deferred job state, events, results and cancellation

The same inference and model routes are exposed without /v1. Discovery compatibility includes /api/v1/models, /api/tags, /version, /props and /v1/props.

#Responses

bash
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

bash
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

bash
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.

dotenv
REALTIME_PROVIDER=openai

To use a billed OpenAI-compatible Realtime API account:

dotenv
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-Decision
  • X-MultiVibe-Priority
  • X-MultiVibe-Resolved-Model
  • X-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.

bash
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

Status Meaning 400 Invalid request or unsupported parameter 401 Missing or invalid credential 403 Credential lacks access to the model or member quota 404 Model or alias not exposed 409 Idempotency key reused with a different payload 429 Account or application limit reached 502 Upstream provider failure 503 No eligible capacity for the request

The exact body follows the selected dialect. Log the status, the request id and the short error message; do not log credentials or full prompts.

#Source references