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

# AI Gateway

> A standalone routing layer for production LLM traffic. Reach 500+ models through one OpenAI-compatible endpoint with fallbacks and usage tracking.

AI Gateway is a standalone routing layer for production LLM traffic. Send requests through one OpenAI-compatible endpoint to access 500+ models across providers, with built-in fallbacks, retries, load balancing, and usage tracking.

## Quick Start

Complete the first request in a few minutes.

<Steps titleSize="h3">
  <Step title="Create an account">
    [Sign up](https://my.orq.ai/auth/signup), then open the AI Gateway workspace.
  </Step>

  <Step title="Connect a provider">
    Open BYOK, choose [OpenAI](/ai-studio/integrations/providers/openai), select Connect, and add your provider API key.
  </Step>

  <Step title="Set up Orq.ai">
    <Tabs>
      <Tab title="API key only" icon="key">
        Open **Settings > Organization > [API Keys](/ai-studio/organization/api-keys)**, select Create API key, and copy the key.
      </Tab>

      <Tab title="Coding agent" icon="robot">
        Paste this prompt into the coding agent to route its model calls through the Gateway:

        ```prompt wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
        Install the Orq.ai CLI, run `orq setup`, and route this agent's model calls through the AI Gateway.
        ```

        Or install the CLI directly:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -fsSL https://cli.orq.ai/install.sh | sh
        ```

        `orq setup` signs in, creates a project-scoped API key, and connects the coding agents already on the machine to **Orq.ai**, including the **Orq MCP** server and **Orq Skills**.

        <Tip>
          Connecting a coding assistant directly? See [Orq Skills](/ai-studio/integrations/code-assistants/orq-skills) and [Orq MCP](/ai-studio/integrations/code-assistants/orq-mcp).

          Full command list: [CLI reference](/reference/cli).
        </Tip>

        `orq setup` writes the key to `~/.orq/env` as a POSIX shell export. Source it from bash or zsh to export the key for the request below:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        source ~/.orq/env
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Run a request">
    Set the key in your terminal and send a request to the Responses endpoint.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    # skip this line if orq setup already exported the key
    export ORQ_API_KEY="your-api-key"

    curl -X POST https://my.orq.ai/v3/router/responses \
      -H "Authorization: Bearer $ORQ_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai/gpt-5.4",
        "input": "Hello, world!"
      }'
    ```

    Self-hosted and on-premise deployments serve `/v3/router` under their own hostname. See [Base URLs](/reference/base-urls).
  </Step>

  <Step title="Inspect the request">
    Open [Traces](/ai-gateway/traces) to review the response, latency, token usage, and cost.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Fallbacks & Retries" icon="shuffle" href="/ai-gateway/features/retries">
    Keep requests flowing when a provider fails.
  </Card>

  <Card title="Supported Models" icon="list" href="/ai-gateway/supported-models">
    Browse the model catalog and provider capabilities.
  </Card>

  <Card title="Migrate to Orq.ai" icon="arrow-right-arrow-left" href="/ai-gateway/get-started/migrate">
    Move an existing application from the OpenAI SDK, OpenRouter, or LiteLLM.
  </Card>

  <Card title="Model FAQ" icon="circle-question" href="/ai-gateway/model-faq">
    Answers to common questions about models and their capabilities.
  </Card>
</CardGroup>
