Skip to content

Developers

Keep the OpenAI SDK. Change the decision layer.

Waymesh exposes an OpenAI SDK-compatible chat-completions gateway at https://waymesh.net/v1. Existing clients can keep the same SDK call shape, swap the base URL, use a Waymesh API key, and select a routing strategy instead of hard-coding one provider.

Quickstart

Three changes to an existing client.

  1. 01

    Base URL

    Set the client base URL to https://waymesh.net/v1.

  2. 02

    API key

    Use a Waymesh API key as the bearer token.

  3. 03

    Strategy

    Set model to a Waymesh routing strategy.

Python · OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://waymesh.net/v1",
    api_key="<waymesh-api-key>",
)

response = client.chat.completions.create(
    model="waymesh/fastest",
    messages=[
        {"role": "user", "content": "Summarize this in one sentence."}
    ],
)

print(response.choices[0].message.content)

Routing strategies

The model field becomes the routing intent.

Waymesh does not treat provider model IDs such as gpt-4o as aliases. Unknown IDs fail instead of silently changing the caller's intent.

waymesh/auto

Balanced

Default balance of speed, cost and privacy constraints.

waymesh/fastest

Fastest

Prioritizes the highest speed score among eligible routes.

waymesh/cheapest

Cheapest

Prioritizes the lowest estimated cost among eligible routes.

waymesh/private

Private

Requires a private-eligible execution route or fails closed.

HTTP

No SDK required.

curl https://waymesh.net/v1/chat/completions \
  -H "Authorization: Bearer <waymesh-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"waymesh/cheapest","messages":[{"role":"user","content":"Hello"}]}'

Streaming is available with stream: true and uses OpenAI-compatible server-sent events.

Current boundary

Compatible where it is implemented.

The gateway currently supports chat completions and streaming. Tool calling, native provider-side multi-turn message threading, response-format enforcement and sampling controls are not yet implemented. Those fields are not advertised here as working features.