Bridge by Wekoya / Docs / Chat

Responses API and Codex

Updated

Bridge also answers OpenAI's Responses API, at POST /v1/responses, on every chat model. Tools that only speak it work unchanged: OpenAI's Codex CLI, client.responses.create in the OpenAI SDKs, and the Vercel AI SDK's default openai(model). It is billed, limited and logged exactly like a chat completion. For new code, Chat Completions is still the simplest choice.

from openai import OpenAI

client = OpenAI(api_key="wk_live_...", base_url="https://wekoya-api.wekoya.tech/v1")

# Nothing is stored, so send the whole conversation every time.
history = [{"role": "user", "content": "Write a one-line welcome for a Lagos bakery."}]
reply = client.responses.create(
    model="claude-sonnet-5-5",
    instructions="You write short, warm copy.",
    input=history,
    store=False,
)
print(reply.output_text)

# The next turn: add the reply's items, then the new message.
history += [item.model_dump() for item in reply.output]
history.append({"role": "user", "content": "Now one for Abuja."})
reply = client.responses.create(model="claude-sonnet-5-5", input=history, store=False)

What works, and what does not

Codex

Codex only speaks the Responses API, so it needs this endpoint. Add Bridge as a provider in ~/.codex/config.toml (Codex ignores providers in a project's own config file), put your key in WEKOYA_API_KEY, and run codex. Any model with tool calling works; pick one with "tools": true on the models page.

# ~/.codex/config.toml
model = "claude-sonnet-5-5"
model_provider = "bridge"

[model_providers.bridge]
name = "Bridge by Wekoya"
base_url = "https://wekoya-api.wekoya.tech/v1"
env_key = "WEKOYA_API_KEY"
wire_api = "responses"