use llm gateway.md

Using the LLM Gateway

Send LLM traffic from Cursor, Claude Code, Codex, your apps, and the OpenAI / Anthropic SDKs through the Barndoor LLM Gateway.

Overview

The Barndoor LLM Gateway is a proxy that sits between your AI tools and one or more upstream LLM providers (OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Google Vertex AI, and many more). It speaks both the OpenAI Chat Completions / Responses / Embeddings APIs and the Anthropic Messages API natively, so most clients — including OpenAI's and Anthropic's SDKs, Cursor, Claude Code, Codex, LangChain, and similar tools — work simply by pointing their base URL at Barndoor.

Pointing your client at the gateway gives you a single endpoint that:

Anything that speaks the OpenAI Chat Completions / Embeddings / Responses API can use the gateway by setting base_url. Clients that prefer Anthropic's Messages API (for example Claude Code) can talk to the gateway directly as well.

Architecture at a Glance

flowchart TB
    Client["Your client<br/>Cursor • Claude Code • Codex • SDK • curl"]
    Client -- "Bearer bd-…<br/>OpenAI / Anthropic JSON" --> Gateway

subgraph Gateway["Barndoor LLM Gateway"]
        direction TB
        Auth["API-key auth"]
        Access["Model access policies"]
        Limits["Rate limits &amp; budgets"]
        Routing["Routing, retry &amp; failover"]
    end

Gateway --> OpenAI[OpenAI]
    Gateway --> Anthropic[Anthropic]
    Gateway --> Azure[Azure OpenAI]
    Gateway --> Bedrock[AWS Bedrock]
    Gateway --> Vertex[Google Vertex AI]
    Gateway --> Other["…and other<br/>supported providers"]

Before You Begin

You'll need:

The LLM Gateway is being rolled out per tenant. If you don't see the LLM Management or My Models menu items, contact your Barndoor admin or support@barndoor.ai to have it enabled for your organization.

Self-hosted and private-cloud deployments: if Barndoor is running on your own infrastructure, swap app.barndoor.ai for your organization's portal hostname everywhere in this guide. The path (/api/llm-gateway/v1) is the same.

Next Steps

Ready to set up the gateway and send your first request? Continue to the Quickstart Guide, which covers:

For Codex CLI and Codex Desktop specifically (Responses wire format, config.toml, and the /v1 base-URL footgun), see Use Codex with the LLM Gateway.