WayJet is an OpenAI-compatible gateway. Point any OpenAI SDK at the base URL below, use a sk- API key, and call every provider through one unified API.
Multiple providers
OpenAI, Anthropic, Gemini, Groq, and more behind one API.
OpenAI-compatible
Point any OpenAI SDK at the base URL — no code changes.
Streaming
Token-by-token SSE on chat completions out of the box.
Keys & budgets
Scoped keys, per-period spend limits, and usage tracking.
Counts reflect your gateway catalog once models load.
Every request goes to a single base URL. Because the gateway speaks the OpenAI wire format, existing SDKs and tools work unchanged — you only swap the base URL and key.
http://localhost:8080/v1Authenticate with a bearer token in the Authorization header. Create a sk--prefixed key on the API keys page — the secret is shown only once, so store it somewhere safe.
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxx
Send your first chat completion. Set WAYJET_API_KEY to your API key.
curl http://localhost:8080/v1/chat/completions \
-H "Authorization: Bearer $WAYJET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello"}]
}'POST /v1/chat/completions — the core endpoint. Requests and responses follow the OpenAI schema; the gateway adds provider and cache_status to the response.
| Parameter | Type | Description |
|---|---|---|
| model* | string | Model id, e.g. gpt-4o |
| messages* | array | Conversation messages (role + content) |
| stream | boolean | Stream tokens back as server-sent events |
| temperature | number | Sampling temperature, 0–2 (default 1) |
| max_tokens | integer | Maximum tokens to generate |
| top_p | number | Nucleus sampling probability mass |
| tools | array | Function/tool definitions the model may call |
| tool_choice | string | object | Force or constrain tool selection |
| response_format | object | e.g. { "type": "json_object" } for JSON mode |
| reasoning_effort | string | low · medium · high (reasoning models) |
| stop | string | array | Up to 4 stop sequences |
| seed | integer | Best-effort deterministic sampling |
| provider | string | Gateway-only — pin the request to one provider |
* required
Set stream: true to receive tokens as server-sent events. Each event is a data: line with a delta; the stream ends with data: [DONE].
curl http://localhost:8080/v1/chat/completions \
-H "Authorization: Bearer $WAYJET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}'
# → server-sent events: lines of data: {...} terminated by data: [DONE]POST /v1/embeddings — vectorize text for search and RAG. Accepts a string or an array of strings.
curl http://localhost:8080/v1/embeddings \
-H "Authorization: Bearer $WAYJET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "The quick brown fox"
}'POST /v1/audio/speech turns text into spoken audio (billed per input character), and POST /v1/audio/transcriptions turns an uploaded audio file into text (billed per audio-minute). Both are OpenAI-compatible.
curl http://localhost:8080/v1/audio/speech \
-H "Authorization: Bearer $WAYJET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}' \
--output speech.mp3Upload the file as multipart/form-data. Set response_format to srt, vtt, or verbose_json for timestamped subtitles instead of plain text.
curl http://localhost:8080/v1/audio/transcriptions \ -H "Authorization: Bearer $WAYJET_API_KEY" \ -F "model=whisper-1" \ -F "file=@audio.mp3" \ -F "response_format=json" # json (default) · text · srt · vtt · verbose_json
GET /v1/models returns the catalog available to your key, each with pricing and capability metadata.
curl http://localhost:8080/v1/models \ -H "Authorization: Bearer $WAYJET_API_KEY"
The gateway speaks the Anthropic Messages API (POST /v1/messages) and the OpenAI Responses API (POST /v1/responses), so the popular coding CLIs point straight at WayJet and bill through your own key — no proxy, no per-vendor SDK. Point each tool at a model you can call.
Add to ~/.claude/settings.json. The key rides ANTHROPIC_AUTH_TOKEN (or ANTHROPIC_API_KEY as the x-api-key header), and each tier maps to a model of your choice.
{
"hasCompletedOnboarding": true,
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:8080",
"ANTHROPIC_AUTH_TOKEN": "sk-your-key",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "your-opus-squad",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "your-sonnet-squad",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "your-haiku-squad"
}
}Codex uses the OpenAI Responses API by default — no wire_api = "chat" override needed.
model = "your-squad" model_provider = "wayjet" [model_providers.wayjet] name = "WayJet" base_url = "http://localhost:8080/v1" wire_api = "responses"
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "sk-your-key"
}Tip: append :online to a model name for live web search, or pass models: ["fallback"] for automatic fallback.
Errors use standard HTTP status codes and an OpenAI-style envelope.
{
"error": {
"message": "Incorrect API key provided.",
"type": "authentication_error",
"code": null,
"param": null
}
}| Status | Type | Meaning |
|---|---|---|
| 200 | OK | The request succeeded |
| 400 | invalid_request_error | Malformed request or invalid parameters |
| 401 | authentication_error | Missing, invalid, or revoked API key |
| 403 | permission_error | The key is not allowed to perform this action |
| 404 | not_found_error | Unknown model or resource |
| 429 | rate_limit_error | Rate limit hit, or a budget was exceeded |
| 500 | api_error | An unexpected gateway error |
The endpoints you can call with an API key. Keys, usage, and budgets are managed from the dashboard.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat completion (streaming + non-stream) |
| POST | /v1/embeddings | Create embeddings |
| POST | /v1/audio/speech | Text-to-speech (audio out) |
| POST | /v1/audio/transcriptions | Speech-to-text (transcription) |
| GET | /v1/models | List available models |
| POST | /p/{provider}/{path} | Provider passthrough (native API) |
Notable changes to the public API. The base URL stays /v1 for backward compatibility.