WayJetWayJetDocs
Sign inGet API key
IntroductionAuthenticationQuickstartChat completionsStreamingTool callingStructured outputsVisionEmbeddingsAudio (speech)ModelsRate limitsErrorsEndpointsChangelog
IntroductionAuthenticationQuickstartChat completionsStreamingTool callingStructured outputsVisionEmbeddingsAudio (speech)ModelsRate limitsErrorsEndpointsChangelog

API & Docs

v1· Updated Jun 2026

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.

Loading live catalog…

Introduction#

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.

https://api.wayjet.ai/v1

Authentication#

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

header
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxx
Never expose a key in client-side code. Call the gateway from your server, or proxy it.
Create an API key

Quickstart#

Send your first chat completion. Set WAYJET_API_KEY to your API key.

curl https://api.wayjet.ai/v1/chat/completions \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Try it in the Playground

Chat completions#

POST /v1/chat/completions — the core endpoint. Requests and responses follow the OpenAI schema; the gateway adds provider and cache_status to the response.

ParameterTypeDescription
model*stringModel id, e.g. gpt-4o
messages*arrayConversation messages (role + content)
streambooleanStream tokens back as server-sent events
temperaturenumberSampling temperature, 0–2 (default 1)
max_tokensintegerMaximum tokens to generate
top_pnumberNucleus sampling probability mass
toolsarrayFunction/tool definitions the model may call
tool_choicestring | objectForce or constrain tool selection
response_formatobjecte.g. { "type": "json_object" } for JSON mode
reasoning_effortstringlow · medium · high (reasoning models)
stopstring | arrayUp to 4 stop sequences
seedintegerBest-effort deterministic sampling
providerstringGateway-only — pin the request to one provider

* required

Streaming#

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 https://api.wayjet.ai/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]

Tool calling#

Declare tools and the model replies with tool_calls. Run them yourself, then send each result back as a role: tool message for the final answer. Set tool_choice to auto, none, or a specific function.

curl https://api.wayjet.ai/v1/chat/completions \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "What is the weather in Hanoi?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the current weather for a city",
        "parameters": {
          "type": "object",
          "properties": {"city": {"type": "string"}},
          "required": ["city"]
        }
      }
    }],
    "tool_choice": "auto"
  }'

Structured outputs#

Pass a response_format of type json_schema to constrain the reply to valid, parseable JSON — no scraping free-form text. Use json_object for looser JSON mode.

curl https://api.wayjet.ai/v1/chat/completions \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Extract the name and age: Kai is 29."}],
    "response_format": {
      "type": "json_schema",
      "json_schema": {
        "name": "person",
        "schema": {
          "type": "object",
          "properties": {"name": {"type": "string"}, "age": {"type": "integer"}},
          "required": ["name", "age"],
          "additionalProperties": false
        }
      }
    }
  }'

Vision#

Send images by using the array form of content with image_url parts alongside text. The URL can be a public link or a data: base64 URI. Requires a vision-capable model.

curl https://api.wayjet.ai/v1/chat/completions \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this image?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}}
      ]
    }]
  }'

Embeddings#

POST /v1/embeddings — vectorize text for search and RAG. Accepts a string or an array of strings.

curl https://api.wayjet.ai/v1/embeddings \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "The quick brown fox"
  }'

Audio (speech)#

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.

Text-to-speech

curl https://api.wayjet.ai/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.mp3

Speech-to-text

Upload the file as multipart/form-data. Set response_format to srt, vtt, or verbose_json for timestamped subtitles instead of plain text.

curl https://api.wayjet.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $WAYJET_API_KEY" \
  -F "model=whisper-1" \
  -F "[email protected]" \
  -F "response_format=json"   # json (default) · text · srt · vtt · verbose_json

Models#

GET /v1/models returns the catalog available to your key, each with pricing and capability metadata.

shell
curl https://api.wayjet.ai/v1/models \
  -H "Authorization: Bearer $WAYJET_API_KEY"
Browse all models

Rate limits#

Each API key has its own requests-per-minute and tokens-per-minute limits, configurable per key. Exceeding one returns 429 rate_limit_error — back off and retry with exponential delay.

Set or raise a key’s limits from the API Keys page; budgets can also cap total spend per key.
Manage API keys →

Errors#

Errors use standard HTTP status codes and an OpenAI-style envelope.

json
{
  "error": {
    "message": "Incorrect API key provided.",
    "type": "authentication_error",
    "code": null,
    "param": null
  }
}
StatusTypeMeaning
200OKThe request succeeded
400invalid_request_errorMalformed request or invalid parameters
401authentication_errorMissing, invalid, or revoked API key
403permission_errorThe key is not allowed to perform this action
404not_found_errorUnknown model or resource
429rate_limit_errorRate limit hit, or a budget was exceeded
500api_errorAn unexpected gateway error
View your usage & rate limits

Endpoints#

The endpoints you can call with an API key. Keys, usage, and budgets are managed from the dashboard.

MethodEndpointDescription
POST/v1/chat/completionsChat completion (streaming + non-stream)
POST/v1/embeddingsCreate embeddings
POST/v1/audio/speechText-to-speech (audio out)
POST/v1/audio/transcriptionsSpeech-to-text (transcription)
GET/v1/modelsList available models

Changelog#

Notable changes to the public API. The base URL stays /v1 for backward compatibility.

  • Jul 2026Audio: text-to-speech (/v1/audio/speech) and speech-to-text (/v1/audio/transcriptions, with srt/vtt/verbose_json formats).
  • May 2026Embeddings endpoint + JSON mode (response_format) support.
  • Apr 2026Streaming (SSE) on chat completions; provider pinning.