Bridge documentation

Bridge is an OpenAI-compatible API. Send requests to https://wekoya-api.wekoya.tech/v1/chat/completions with an Authorization: Bearer header carrying your Bridge key.

Updated

Bridge speaks OpenAI's API. Use any OpenAI SDK with the base URL https://wekoya-api.wekoya.tech/v1 and your Bridge key.

  1. Your app sends a request OpenAI's format, with your Bridge key.
  2. Bridge picks a provider And tries another if the first fails before answering.
  3. The model answers Streamed or all at once.
  4. You see the cost In naira, on the reply and in the console.
  1. Create an account, top up under Billing (a bank transfer lands in about a minute) and create a key under API keys.
  2. Put the key in your environment: export WEKOYA_API_KEY=wk_live_…
  3. Send a request:
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://wekoya-api.wekoya.tech/v1",
    api_key=os.environ["WEKOYA_API_KEY"],
)

reply = client.chat.completions.create(
    model="auto",
    messages=[
        {"role": "user", "content": "Summarise this ticket for me."}
    ],
)

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

The key is a credential: keep it on your server and out of your repository. To try models before writing code, open the Playground in the console.

What Bridge does

Quickstart

Create a key in the console, then point any OpenAI-compatible client at https://wekoya-api.wekoya.tech/v1. Examples are given for curl, Python and JavaScript, including streaming.

Build it with your coding agent

Give Claude Code, Cursor, Codex, Copilot or any coding agent the Bridge skill (https://bridge.wekoya.tech/skills/bridge/SKILL.md) and ask it to add AI to your app. It tells the agent where the key goes, how to call Bridge and how to handle every error.

End users

Keep one key on your server and name the user on each request with the X-Bridge-End-User header. Bridge meters each user separately and enforces their budget.

Embeddings, image generation, files in chat and music

Gemini embeddings on OpenAI's /v1/embeddings, image generation and editing with Gemini's Nano Banana and OpenAI's GPT Image models on /v1/images, audio, video, PDFs and YouTube links read by Gemini models in chat, and songs from Google's Lyria. All billed in naira.

Context caching and batches

Store a long document, file or video once and ask about it many times at the cached rate, or send up to 2,000 chat requests as a batch at half price, answered within a day. On Gemini models, billed in naira.

Workloads: switch to cheaper models without losing quality

Measure models on your own cases against a contract, let Bridge rewrite your instructions so a cheaper model meets the same bar, and deploy the result under a stable name with automatic checks, repair and fallback. The solution architect designs a pipeline from a plain-language problem.

Voice: speech to text and text to speech

Transcribe recordings with nova-3 and turn text into speech with aura-2, on OpenAI's audio routes so the OpenAI SDK works unchanged. Billed in naira by the second of audio and the character of text.

Live transcription and voice agents

Stream audio over a WebSocket and get words back as people speak, with Deepgram's Nova-3 or Flux, which detects when a speaker has finished. Combine it with streaming chat and speech to build a voice agent that answers phone calls, billed in naira by the second.

Live voice conversations with Gemini Live

One WebSocket where the model hears the caller and answers by voice, in English, Yoruba, Hausa or Pidgin, with its first sound about 1.3 seconds after the caller stops. It can call your tools mid-conversation. Billed in naira by the minute heard and spoken.

Decisions with Jev

Jev, by TypeSafe, answers typed questions about a message, document or record (choose a label, give a score, or say yes or no) with a calibrated probability, in about a second. Send it to POST /v1/decisions; it is billed in naira like every other model.

Errors

Every error has a stable code, such as end_user_budget_exhausted or model_unavailable, and the page explains what each one means.

Get started

  • Quickstart: Bridge speaks OpenAI's API. Use any OpenAI SDK with the base URL https://wekoya-api.wekoya.tech/v1 and your Bridge key.
  • Use a coding agent: The Bridge skill tells a coding agent (Claude Code, Cursor, Codex, Copilot, Windsurf and others) exactly how to add Bridge to your app: where the key goes,…
  • MCP server: Bridge has an MCP server, so an AI assistant or coding agent can use Bridge for you: find and price models, run and compare them, make pictures, videos,…
  • Browser and mobile apps: Your API key must stay on your server. To let a web page or a phone app call Bridge directly (for chat, voice or pictures without a round trip through your…

Chat

  • Choosing a model: You can name a specific model, or send "auto" and let one be chosen for you. Naming a model is the right call when you have tested one and want it to stop…
  • Streaming: Set stream: true and the reply arrives in pieces. This is what makes an assistant feel like it is thinking rather than hanging. Long reasoning models are…
  • Images, audio, video, PDFs: Attach an image alongside the text and a model that can read it is chosen for you. Nothing you attach is written to our database.
  • Tool calling (function calling): Let the model use your code: look up an order, check a balance, book a slot, search your database. You describe the functions you have, the model asks for…
  • Responses API and Codex: 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,…
  • Prompt caching: When your requests start the same way (the same instructions, tools or document), that start is kept warm and read again at the cached rate, often a tenth…
  • Context caches: Ask many questions about one long thing (a handbook, a contract, a video) without paying for it in full each time. Store it once as a cache, then name the…
  • Batches: Send up to 2,000 chat requests at once and get the answers within a day, usually within minutes, at half the price. For work nobody is waiting on:…

Media

  • Embeddings: Turn text into vectors for search, recommendations and "chat with your documents", on OpenAI's POST /v1/embeddings. gemini-embedding-2 (₦297 per million…
  • Generating images: Create and edit images with Google's Gemini image models (Nano Banana) and OpenAI's GPT Image, on OpenAI's /v1/images/generations and /v1/images/edits.…
  • Voice: Turn calls, voice notes and lessons into text, and text into natural speech, on the same key and balance. The routes are OpenAI's, so the OpenAI SDK's…
  • Live transcription: Stream audio over a WebSocket and get the words back while people are still speaking: live captions, call notes, voice commands, and the listening half of a…
  • Voice agents: A voice agent is three Bridge calls in a loop: it listens with live transcription (flux-general-en, which says when the caller has finished), thinks with a…
  • Live voice (Gemini Live): One WebSocket that hears the caller and answers out loud: Gemini Live, through Bridge, on your key and balance. There is no separate listening and speaking…
  • Music: Jingles, background tracks and full songs from a description, by Google's Lyria, on POST /v1/audio/music. lyria-3-clip-preview makes a 30-second clip in…
  • Video: Filmed-looking clips with sound, from a description and optionally a first frame, by Google's Veo, and talking videos of a person from a picture and a voice…

Web

  • Web search: Search the live web from your app on POST /v1/search: news, prices and rates, what people are saying about a brand, anything a model cannot know from its…

Decisions

  • Decisions (Jev): Jev, by TypeSafe, does not write text. You give it something to look at (a message, a document, a record) and named questions about it, and it answers each…

Improve

  • Switch to a cheaper model safely: A cheaper model can often do your job as well as the one you use now, but your instructions were written for the old one. Bridge tests the cheaper model on…
  • Design a solution: Describe a problem in plain words. You get the steps to solve it with Bridge (listen, read, think, decide, speak), the cheapest model that can do each step…
  • Pipelines: Several steps behind one endpoint: listen to a voice note, pull out the order, check for a complaint, and speak a reply. Each step reads the request…

Your account

  • Your users' budgets: If your app has its own users, give each one an AI budget instead of letting them all draw from one bucket. Your backend keeps one key and names the user on…
  • Companies and apps: A company has its own wallet, members with roles (owner, admin, member, viewer), and keys. A person's key or signed-in session acts for a company they are…
  • Webhooks: Add an HTTPS URL on the End users page, or with POST /v1/webhooks and { "url": "...", "events": ["*"] }. The signing secret is shown once. Events:
  • Key limits and models: A key can be limited to some models, so a leaked or misused key cannot run up a bill on the most expensive one. Rules are exact ids (claude-sonnet-5),…
  • Your own provider keys: If you already pay a model provider (Anthropic, OpenAI, Google, your own AWS account, DeepSeek, OpenRouter and the others below), store that key here and…
  • What it costs: Prices are per million tokens, in naira, and the price for a model is the same whether a request succeeds or fails. A refused request is refused before any…

Reference

  • Errors: Every error carries a machine-readable type, so your code can branch on the reason rather than on the message.
  • Questions: Answers to common questions about Bridge: paying in naira without a card, tokens, model auto, the Playground, companies, end-user budgets, your own provider keys and whether prompts are stored.