Quickstart

Start routing LLM requests through Ingate in under 5 minutes, on Ingate Cloud or your own infrastructure.

Two ways to run Ingate

Use Ingate Cloud: sign up at app.ingateai.com and point your requests at https://api.ingateai.com. Or self-host the gateway yourself with Docker or the Go binary; it serves on http://localhost:7100. See Deployment for production setup. The steps below cover Ingate Cloud first, then self-hosting.

1. Create Your Account

Head to app.ingateai.com and create an account. This sets up your organization and generates your first Ingate API key. It looks like sk-ingate-....

Save your API key

Your raw API key is shown only once during creation. Copy it somewhere safe. It cannot be retrieved later.

2. Add a Provider

In the dashboard, navigate to Dashboard → Providers and click Add Provider. Choose the LLM provider you want to route to (OpenAI, Anthropic, etc.) and select an auth mode:

API Key Mode

Ingate securely stores your provider API key (e.g. your OpenAI sk-... key) and injects it into every proxied request. Your clients never see the provider key. They only use their Ingate key.

This is the default for most use cases: backend services, internal tools, and any app where you manage the provider subscription.

Passthrough Mode

For tools that already have their own provider subscription, like Claude Code Pro or Claude Code Max: Ingate passes the client's auth token straight through to the provider. Ingate doesn't store or replace the credentials; it just observes, logs, and applies your policies.

Use passthrough when your developers or coding agents bring their own subscriptions and you want centralized visibility without managing provider keys yourself.

Auto-detection

Ingate automatically detects the target provider from the request path. /v1/chat/completions routes to OpenAI, /v1/messages routes to Anthropic, and so on. You don't need to specify the provider explicitly.

3. Send Your First Request

Send a request to Ingate the same way you would to your provider. Just swap the base URL and add your Ingate key. The provider is auto-detected from the path:

bash
curl https://api.ingateai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-Ingate-Key: sk-ingate-your-key" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

That's it. No X-Ingate-Provider header needed. Ingate sees /v1/chat/completions and routes to OpenAI automatically.

For Anthropic, use the Anthropic path and body format:

bash
curl https://api.ingateai.com/v1/messages \
  -H "Content-Type: application/json" \
  -H "X-Ingate-Key: sk-ingate-your-key" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Done

The request is proxied to the provider, the response streams back to your client, and everything is logged automatically. Open your dashboard to see the trace.

4. SDK Integration

Swap the base URL and set your Ingate key. Auto-detection handles routing with no extra headers required.

Python

pythonapp.py
from openai import OpenAI

client = OpenAI(
    base_url="https://api.ingateai.com/v1",
    api_key="sk-ingate-your-key",  # your Ingate key, not an OpenAI key
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello from Ingate!"}],
)
print(response.choices[0].message.content)

TypeScript

tsapp.ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.ingateai.com/v1",
  apiKey: "sk-ingate-your-key", // your Ingate key, not an OpenAI key
});

const response = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello from Ingate!" }],
});
console.log(response.choices[0].message.content);

Works with any OpenAI-compatible SDK

The OpenAI SDK sends requests to /v1/chat/completions by default. Ingate auto-detects this as OpenAI and routes accordingly. The same pattern works for the Anthropic SDK. Just set the base URL to https://api.ingateai.com.

5. Check Your Dashboard

Open app.ingateai.com and you'll see your requests in real time: provider, model, token counts, latency, cost, and full request/response bodies. Every request through Ingate is logged automatically.

Self-Hosting

Prefer to run the gateway yourself? Ingate ships as a single Go binary. You need Go 1.22+ (for building from source) or Docker, PostgreSQL 14+ (log storage, prompts, evals), and optionally Redis 7+ (rate limiting, prompt cache).

Start infrastructure

bash
docker compose up -d postgres redis

Configure

bash
cp ingate.example.yaml ingate.yaml

Edit ingate.yaml. Set your provider API keys:

yamlingate.yaml
providers:
  openai:
    base_url: https://api.openai.com
    api_key: sk-your-key-here
    enabled: true

Set the database URL:

yamlingate.yaml
database:
  postgresql_url: postgres://ingate:ingate_dev@localhost:5432/ingate?sslmode=disable
  redis_url: redis://localhost:6379

Run

bash
# From source
go build -o bin/ingate ./cmd/ingate/
./bin/ingate serve

# Or with Docker
docker compose up

The gateway starts on http://localhost:7100.

Verify

bash
curl http://localhost:7100/healthz
# {"status":"ok","components":{"postgresql":{"status":"ok"},"redis":{"status":"ok"}}}

Then send requests exactly as in the steps above, using your self-hosted base URL instead of https://api.ingateai.com. See Deployment for Docker images, multi-instance setups, and production configuration.

Onboard from an Agent

Any MCP-capable agent (Claude Code, Cursor, Windsurf, VS Code, Codex) can connect to {base_url}/mcp with no credentials and call the ingate_setup tool. One call creates the account, org, app, provider configs, and API key, and returns a ready-to-run snippet. See MCP Server for connection snippets per agent and the full tool catalog.

Next Steps