Skip to main content

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:
  • Centralizes provider credentials — provider API keys stay in Barndoor, never on developer machines.
  • Enforces governance — rate limits, token budgets, and per-user / per-team model access policies.
  • Routes intelligently — model routes, multi-provider failover, and automatic retries on transient 429s.
  • Records usage — per-request token, cost, and latency telemetry surfaced in the Barndoor portal.
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

Before You Begin

You’ll need:
  • A Barndoor account with access to the LLM Management area (admin) and/or the My Models settings page (any user).
  • The base URL of your Barndoor portal. Throughout this guide we use https://app.barndoor.ai (the Barndoor SaaS host). The authoritative value for your tenant is shown in the LLM Gateway Endpoint card on Settings → My Models — copy it from there.
  • For admins setting up the gateway for the first time: an upstream provider account (OpenAI, Anthropic, etc.) and credentials for it.
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 [email protected] 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

Admins set the gateway up first — continue to the Quickstart Guide, which covers:
  • Admin configuration — credentials, providers, models, pricing, and model routes.
  • Sending requests, observability headers, failover, troubleshooting, and FAQ.
Developers working against an already-configured gateway can go straight to Connecting Your Tools to the LLM Gateway:
  • Getting your API key, model route name, and gateway endpoint from the portal.
  • Configuring Cursor, Claude Code, Codex, LangChain, and the OpenAI/Anthropic SDKs.
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.