Inja LLM Gateway
Get started
Open source · AGPL-3.0Go 1.25+

One gateway.Every LLM dialect.

Inja sits between your agents and providers. Clients keep talking OpenAI, Anthropic, or Gemini — you route, translate, and meter without rewriting every integration.

  • Single static binary
  • yaml.v3 only at runtime
  • No vendor SDK lock-in
  • AGPL-3.0
gateway.yaml
# multi-provider edge
providers:
  openai:
    kind: openai
    base_url: https://api.openai.com/v1
  anthropic:
    kind: anthropic
    base_url: https://api.anthropic.com/v1
  deepseek:
    kind: openai_compat
    base_url: https://api.deepseek.com

defaults:
  openai_dialect: openai
  anthropic_dialect: anthropic

aliases:
  fast: deepseek/deepseek-chat

hooks:
  jsonl:
    output: stdout

Request path

Clients stay native. Upstreams stay flexible.

A thin edge process — YAML config, no database, no vendor SDKs at runtime. Same-family traffic never pays a translation tax.

Ingress

  • POST /v1/chat/completions
  • POST /v1/messages
  • …/models/*:generateContent
  • /v1/responses · files · batches

Gateway

  • 01Resolve alias / provider / model
  • 02Auth edge keys + upstream api_key_env / ADC
  • 03PT or IR passthrough vs translate
  • 04Hooks usage JSONL / webhook

Egress kinds

  • openaifirst-party
  • openai_compatany host
  • anthropicMessages
  • googleGemini native

How it works

Four moves on every request

  1. 01

    Keep your client dialect

    OpenAI Chat Completions, Anthropic Messages, or native Gemini — same edge, same auth story.

  2. 02

    Route by model id

    Bare models hit defaults. provider/model prefixes and aliases pick the upstream — DeepSeek, xAI, Groq, OpenRouter, vLLM, …

  3. 03

    Passthrough or translate

    Same-family traffic is byte-faithful. Cross-family rebuilds through a canonical IR and fails closed on unsupported shapes.

  4. 04

    Meter every request

    One usage event per call (JSONL / webhook): model, provider, tokens, cache, latency, status.

Quick start

Ship in minutes

Grab a release binary or run Docker. Drop a YAML file. Point your SDK at the edge.

dockerbinary
# compose up with your keys
docker compose up -d

# or grab the release binary
curl -sL https://github.com/inja-online/llm-gateway/releases/latest

# health check
curl -s localhost:8080/healthz

Multi-provider without multi-SDK pain

Install once. Put OpenAI-, Anthropic-, or Gemini-shaped clients behind one edge — and swap backends with config, not code.

Type to search…

↑↓ navigate↵ selectEsc close