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

# Welcome

Michi helps teams understand AI usage, control costs, and deliver reliable AI experiences through analytics, monitoring, and intelligent routing

Michi is an enterprise-grade AI Gateway and Router that provides unified access, smart routing, authentication, and comprehensive telemetry for all major LLM providers.is an enterprise-grade AI Gateway and Router that provides unified access, smart routing, authentication, and comprehensive telemetry for all major LLM providers.

Whether you're calling OpenAI, Anthropic, DeepSeek, or custom open-source models, Michi makes it seamless, fast, and cost-effectiveWhether you're calling OpenAI, Anthropic, DeepSeek, or custom open-source models, Michi makes it seamless, fast, and cost-effective. Whether you're calling OpenAI, Anthropic, DeepSeek, or custom open-source models, Michi makes it seamless, fast, and cost-managed.

***

## Intelligent Gateway

<CardGroup cols={2}>
  <Card title="Semantic Routing Engine" icon="duotone split">
    Analyze the complexity of prompts in real-time. Automatically direct conversational tasks to Flash models, and logic puzzles or code generation to advanced reasoning models.
  </Card>

  <Card title="Equivalent Failovers" icon="duotone shuffle">
    Define equivalent backup model clusters (e.g. mapping GPT-4o to Claude 3.5 Sonnet). If your primary endpoint experiences provider outages or rate limits, the gateway fails over instantly.
  </Card>

  <Card title="Telemetry Optimizer" icon="duotone activity">
    Continuously monitor request latency and success metrics. The gateway dynamically logs response speeds to memory, automatically preferring the fastest provider in yourallowed policy chain.
  </Card>

  <Card title="App, Dev, & Agent Keys" icon="duotone key">
    Issue API keys explicitly classified for human developers, backend apps, or autonomous AI agents to easily separate usage metrics and permissions.
  </Card>
</CardGroup>

## Analytics & Monitoring

<CardGroup cols={2}>
  <Card title="Real-Time Debugger" icon="duotone terminal">
    Inspect live request streams instantly with premium logs. Trace token counts (in/out), request costs, latency, and detailed prompt payloads with inline failover logs.
  </Card>

  <Card title="Shared Live Telemetry" icon="duotone share-nodes">
    Easily share read-only access to specific key logs and performance metrics with developers via secure, public telemetry links.
  </Card>

  <Card title="Unified Credentials Tracking" icon="duotone chart-mixed">
    Track usage, spending splits, and tokens across Apps, Developers, and Agents in real-time from a single dashboard.
  </Card>
</CardGroup>

## Policies & Budgets

<CardGroup cols={2}>
  <Card title="Budget Controls" icon="duotone dollar-sign">
    Define policy guardrails that bind developer API keys to strict daily or monthly consumption budgets to prevent run-away costs.
  </Card>

  <Card title="TPM & RPM Limits" icon="duotone gauge">
    Enforce custom Tokens-Per-Minute (TPM) and Requests-Per-Minute (RPM) rate limits at the key level to prevent rate-limit errors from providers.
  </Card>
</CardGroup>

***

## Quick Start Snippets

Michi fits directly into your existing OpenAI SDK setup. You only need to change the `baseURL` and provide your `Michi API Key`.

### 💻 Javascript / Node.js

```javascript theme={null}
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: "YOUR_MICHI_API_KEY",
  baseURL: "https://api.michiai.co"
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: "openai/gpt-4o-mini",
    messages: [{ role: "user", content: "Hello from Node.js!" }],
  });

  console.log(completion.choices[0].message.content);
}

main();
```

### 🐍 Python

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_MICHI_API_KEY",
    base_url="https://api.michiai.co"
)

completion = client.chat.completions.create(
    model="openai/gpt-4o-mini",
    messages=[
        {"role": "user", "content": "Hello from Python!"}
    ]
)

print(completion.choices[0].message.content)
```

### 🛠️ CLI / Curl

```bash theme={null}
curl -X POST https://api.michiai.co/chat/completions \
  -H "Authorization: Bearer YOUR_MICHI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello from cURL!"}]
  }'
```
