> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrixllm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> MetrixLLM is a drop-in AI gateway for routing, observability, caching, and cost control across every major LLM provider.

<CardGroup cols={3}>
  <Card title="Quickstart" icon="rocket" href="/docs/quickstart">
    Send your first request in 5 minutes
  </Card>

  <Card title="Drop-in Endpoints" icon="plug" href="/docs/drop-in-endpoints">
    Just change your baseURL — no rewrites
  </Card>

  <Card title="Dashboard Guide" icon="layout-dashboard" href="/dashboard/overview">
    Explore the MetrixLLM UI
  </Card>
</CardGroup>

***

## What is MetrixLLM?

MetrixLLM is an AI gateway that sits between your application and your LLM providers. Every request your app makes passes through the gateway, where MetrixLLM applies your routing rules, checks the semantic cache, evaluates guardrails, and logs full telemetry — all in real time with near-zero added latency.

You do not need to rewrite any of your application code. MetrixLLM is fully compatible with the OpenAI, Anthropic, and Google Gemini SDKs. You change one line.

```
Your App ──→ MetrixLLM Gateway ──→ OpenAI / Anthropic / Google / xAI / Groq / Together AI
```

## Core pillars

<CardGroup cols={2}>
  <Card title="Intelligent Routing" icon="arrow-right-arrow-left">
    Define fallback chains. If your primary provider fails, MetrixLLM transparently retries the next one. Your app sees a single clean response.
  </Card>

  <Card title="Full Observability" icon="chart-simple">
    Every request is logged: provider, model, tokens, cost, latency, prompt text, and response — filterable in real time from the dashboard.
  </Card>

  <Card title="Semantic Caching" icon="database">
    Identical or semantically similar prompts are served from cache. No code changes required — enable it once in workspace settings.
  </Card>

  <Card title="Guardrails" icon="shield">
    Block or log requests matching keyword lists, regex patterns, or length constraints — before the upstream provider is ever called.
  </Card>

  <Card title="Cost Control" icon="circle-dollar-to-slot">
    Set hard budget caps and rate limits per workspace or API key. Never get a surprise bill.
  </Card>

  <Card title="Prompt Management" icon="pencil">
    Store, version, and serve prompts from the dashboard. Reference them by ID in requests — no deployments to update a prompt.
  </Card>
</CardGroup>

## How the gateway processes a request

<Steps>
  <Step title="Authentication">
    The gateway validates your `mtx_` API key against your workspace and checks IP allowlists.
  </Step>

  <Step title="Rate Limiting">
    Per-workspace and per-key rate limits (RPM/TPM) and budget caps are evaluated. Requests over the limit are rejected immediately.
  </Step>

  <Step title="Guardrails (Input)">
    Your configured input guardrails are evaluated against the prompt. Blocked requests never reach the upstream provider.
  </Step>

  <Step title="Cache Lookup">
    If semantic caching is enabled, the gateway checks for a matching cached response and returns it instantly if found.
  </Step>

  <Step title="Routing">
    The gateway selects the upstream provider and model based on your routing rules and fallback chain.
  </Step>

  <Step title="Upstream Call">
    The request is forwarded to the provider. On failure, the next fallback in your chain is tried automatically.
  </Step>

  <Step title="Guardrails (Output)">
    Response guardrails are evaluated before the response reaches your app.
  </Step>

  <Step title="Logging">
    Full telemetry (tokens, cost, latency, payloads, session data) is logged asynchronously — zero impact on response time.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart →" icon="rocket" href="/docs/quickstart">
    Make your first request in 5 minutes
  </Card>

  <Card title="Supported Providers →" icon="server" href="/docs/supported-providers">
    OpenAI, Anthropic, Google, xAI, Groq, Together AI
  </Card>
</CardGroup>
