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
- Text, streaming (every Responses event, ending in
response.completed), function tools, custom (free-text) tools, pictures, PDFs and audio ininput, JSON output withtext.format,reasoning.effortandmax_output_tokens. - Nothing is stored. Bridge does not keep prompts or replies, so every response has
"store": false. Send the whole conversation ininputeach time; a request withprevious_response_idorconversationis refused with a 400 that says so. - OpenAI's built-in tools run on OpenAI's servers. File search, code interpreter, computer use and remote MCP are refused by name. Built-in web search is left out rather than refused, so agents that add it by default still work, and the
X-Bridge-Ignored-Toolsheader says it was left out. For the live web, call POST /v1/search from a function tool. - The model's thinking comes back as a reasoning summary. There is no
encrypted_contentto send back, and reasoning items you send back are ignored. - Errors keep the chat route's status and type (a 402 is still
insufficient_funds); see errors.
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"