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

# Welcome to Mesh API

> One key, all AI models. The unified gateway for your AI infrastructure.

Mesh API is an intelligent AI model gateway that provides a unified, OpenAI-compatible interface for accessing LLMs from dozens of providers. One **Router Service Key** (`rsk_...`) gives you access to the world's best models — with built-in billing, logging, rate limits, and performance optimizations.

You don't need to manage multiple API keys, learn different SDKs, or rebuild your integration every time a new model drops. Drop Mesh in as a base-URL replacement and get everything else for free.

## What you can do

<CardGroup cols={2}>
  <Card title="Chat & reasoning" icon="comments" href="/docs/getting-started/quickstart">
    OpenAI-compatible chat completions across 900+ models, plus the Responses API for controllable reasoning effort and provider-hosted tools.
  </Card>

  <Card title="Multi-modal" icon="images" href="/docs/capabilities/images-vision">
    Vision, image and video generation, text-to-speech, speech-to-text, and bidirectional realtime voice.
  </Card>

  <Card title="Retrieval & memory" icon="brain" href="/docs/capabilities/rag">
    Upload and search your own documents, generate embeddings, and attach durable per-user memory to any request.
  </Card>

  <Card title="Cost control" icon="shield-halved" href="/docs/getting-started/rate-limits">
    Per-key spend caps, rate limits, a free response cache, batch pricing, and usage analytics down to the request.
  </Card>
</CardGroup>

## Why Mesh?

* **One universal API** — code once. A single chat-completions request works across every model in the catalog.
* **Unified billing** — deposit funds into one account instead of managing dozens of provider subscriptions.
* **Zero-downtime fallbacks** — automatically retry and reroute around provider outages. See [Retry & Fallback](/docs/platform/retry-and-fallback).
* **Cost optimization** — a free 24-hour response cache, provider prompt caching, batch pricing, and real-time price discovery.
* **Security** — granular API keys with spend caps, rate limits, and zero prompt storage by default.
* **Drop-in replacement** — works with any OpenAI-compatible SDK, no code changes needed.

## How it works

1. **Authenticate** — create a single API key in the dashboard.
2. **Integrate** — replace the base URL of any OpenAI-compatible SDK with `https://api.meshapi.ai/v1`.
3. **Execute** — pass the model ID and standard parameters as you normally would. Mesh routes the request to the underlying provider transparently.

## Integration at a glance

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(
        api_key="rsk_...",
        base_url="https://api.meshapi.ai/v1",
    )

    response = client.chat.completions.create(
        model="openai/gpt-4o",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    ```
  </Tab>

  <Tab title="Node.js">
    ```typescript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: "rsk_...",
      baseURL: "https://api.meshapi.ai/v1",
    });

    const response = await client.chat.completions.create({
      model: "openai/gpt-4o",
      messages: [{ role: "user", content: "Hello!" }],
    });
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl https://api.meshapi.ai/v1/chat/completions \
      -H "Authorization: Bearer rsk_..." \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai/gpt-4o",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'
    ```
  </Tab>
</Tabs>

## Next steps

* [Quickstart](/docs/getting-started/quickstart) — make your first API call in under 5 minutes
* [Account Configuration Checklist](/docs/getting-started/account-checklist) — a 15-minute setup pass over every setting that matters
* [Authentication](/docs/getting-started/authentication) — understand key types and best practices
* [Available Models](/docs/reference/models-list) — the live catalog with pricing
* [Dashboard](/docs/getting-started/dashboard) — manage keys, billing, and usage analytics
