# Responses API and Codex

URL: https://bridge.wekoya.tech/docs/responses
Updated: 2026-11-08

> 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,…

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 in `input`, JSON output with `text.format`, `reasoning.effort` and `max_output_tokens`.
- Nothing is stored. Bridge does not keep prompts or replies, so every response has `"store": false`. Send the whole conversation in `input` each time; a request with `previous_response_id` or `conversation` is 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-Tools` header says it was left out. For the live web, call [POST /v1/search](https://bridge.wekoya.tech/docs/search) from a function tool.
- The model's thinking comes back as a reasoning summary. There is no `encrypted_content` to 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](https://bridge.wekoya.tech/docs/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](https://bridge.wekoya.tech/models).

```
# ~/.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"
```
