> ## 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.

# Quick Start | Route

> Send your first request through the AI Gateway. Connect a provider, hit one unified endpoint, and route across OpenAI, Anthropic, Google, and more.

Already running LLM calls? Point them at the **AI Gateway** to route across providers, add fallbacks, and centralize cost and latency tracking, with a single base URL.

<Steps>
  <Step>
    ### Create your orq.ai account

    [Sign up](https://my.orq.ai/auth/signup) for a free **orq.ai** account and set up your workspace.
  </Step>

  <Step>
    ### Connect a provider

    The **AI Gateway** routes requests through provider credentials configured in the workspace, keeping spend and data fully under control.

    1. Open the [AI Studio](https://my.orq.ai) and go to **AI Gateway > BYOK**.
    2. Pick a provider (this quickstart uses [OpenAI](/docs/integrations/providers/openai)) and click <kbd className="key">Connect</kbd>.
    3. Choose <kbd className="key">Setup your own API key</kbd> and paste the provider key.

    <Info>
      No OpenAI key yet? Create one at [platform.openai.com/api-keys](https://platform.openai.com/api-keys). For other providers, see the [providers overview](/docs/integrations/providers/overview).
    </Info>

    <Frame caption="Add your OpenAI API key in the AI Gateway">
      <img src="https://mintcdn.com/orqai/bhQw0kXY4gf3CTsS/images/providers-add-openai.gif?s=fa38b3d351fb5e0308ab0151206941e9" alt="Adding OpenAI API key in the AI Gateway" width="1200" height="758" data-path="images/providers-add-openai.gif" />
    </Frame>

    <Card title="Supported providers" icon="plug" href="/docs/integrations/providers/overview">
      See the full list of supported model providers and how to connect them.
    </Card>
  </Step>

  <Step>
    ### Get your orq.ai API key

    Open **Organization > [API Keys](/docs/administer/api-keys)** in the left sidebar. Click <kbd className="key">Create API Key</kbd>, give it a name, and copy it.

    Then open a terminal and run the command below, replacing `your-api-key-here` with the key you just copied. The code samples in the next step read it from this environment variable.

    <CodeGroup>
      ```bash macOS / Linux theme={"theme":{"light":"github-light","dark":"github-dark"}}
      export ORQ_API_KEY="your-api-key-here"
      ```

      ```powershell Windows theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $env:ORQ_API_KEY = "your-api-key-here"
      ```
    </CodeGroup>
  </Step>

  <Step>
    ### Make your first request

    Send a request to the unified `/v3/router/chat/completions` endpoint. Use the provider-prefixed model id (e.g. `openai/gpt-4o`).

    <Tabs>
      <Tab title="API & SDK" icon="code">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST https://api.orq.ai/v3/router/chat/completions \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "model": "openai/gpt-4o",
              "messages": [{"role": "user", "content": "Hello, world!"}]
            }'
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import OpenAI from "openai";

          const openai = new OpenAI({
            baseURL: "https://api.orq.ai/v3/router",
            apiKey: process.env.ORQ_API_KEY,
          });

          const completion = await openai.chat.completions.create({
            model: "openai/gpt-4o",
            messages: [{ role: "user", content: "Hello, world!" }],
          });

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

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import os
          from openai import OpenAI

          client = OpenAI(
              base_url="https://api.orq.ai/v3/router",
              api_key=os.environ["ORQ_API_KEY"],
          )

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

          print(completion.choices[0].message.content)
          ```
        </CodeGroup>

        A successful response looks like:

        ```json JSON theme={"theme":{"light":"github-light","dark":"github-dark"}}
        {
          "id": "01K7M0YTJ6X90VHPRDMM5GEC4R",
          "object": "chat.completion",
          "model": "gpt-4o-2024-08-06",
          "choices": [
            {
              "index": 0,
              "message": {
                "role": "assistant",
                "content": "Hello! This is a response. How can I assist you today?"
              },
              "finish_reason": "stop"
            }
          ],
          "usage": { "prompt_tokens": 14, "completion_tokens": 14, "total_tokens": 28 }
        }
        ```
      </Tab>

      <Tab title="Frameworks" icon="puzzle-piece">
        Already using an agent or LLM framework? Point its base URL at the **AI Gateway** and route every call through **orq.ai** with no other code changes.

        <CardGroup cols={2}>
          <Card title="LangGraph" icon="diagram-project" href="/docs/proxy/frameworks/langgraph">
            Stateful, multi-step graphs with full **AI Gateway** access and OpenTelemetry tracing.
          </Card>

          <Card title="Vercel AI SDK" icon="bolt" href="/docs/proxy/frameworks/vercel-ai">
            Stream responses to React Server Components and edge runtime apps.
          </Card>

          <Card title="OpenAI Agents SDK" icon="robot" href="/docs/proxy/frameworks/openai-agents">
            Multi-agent handoffs and tool calls routed through your **orq.ai** workspace.
          </Card>

          <Card title="Agno" icon="layer-group" href="/docs/proxy/frameworks/agno">
            Production Python agents with structured workflows and tool integration.
          </Card>

          <Card title="AWS Strands" icon="aws" href="/docs/proxy/frameworks/aws-strands">
            Model-driven agents routed through the **AI Gateway** with automatic OpenTelemetry tracing.
          </Card>
        </CardGroup>

        <Card title="All frameworks" icon="grid-2" href="/docs/proxy/frameworks/overview">
          See every supported framework, including LangChain, CrewAI, LlamaIndex, Mastra, Pydantic AI, Semantic Kernel, and more.
        </Card>
      </Tab>

      <Tab title="MCP" icon="https://mintcdn.com/orqai/i7ZhKI7LFRfXU7ox/images/logos/mcp.svg?fit=max&auto=format&n=i7ZhKI7LFRfXU7ox&q=85&s=cef7916eb5fe1f6bb97541398d3f7639" width="16" height="16" data-path="images/logos/mcp.svg">
        Install the [**Orq MCP** server](/docs/workspace-mcp) in the editor or AI assistant, then ask the coding assistant:

        ```prompt wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
        Send "Hello, world!" to openai/gpt-4o through the AI Gateway and print the response.
        ```

        The assistant uses `invoke_model` to call the unified router endpoint and returns the completion.
      </Tab>
    </Tabs>
  </Step>

  <Step>
    ### Review the request

    Open the [AI Studio](https://my.orq.ai) and head to **AI Gateway > [Activity](/docs/router/activity)** to see the request, model, latency, token counts, and cost. Each call is also available as a full trace under **Traces**.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    1. Confirm `echo $ORQ_API_KEY` returns the value you expect.
    2. Verify the key under **Organization > [API Keys](/docs/administer/api-keys)** is active.
    3. Make sure the `Authorization: Bearer` header is set, not a query parameter.
  </Accordion>

  <Accordion title="Provider not configured">
    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {"code":401,"error":"API key for openai is not configured in your workspace."}
    ```

    Go to **AI Gateway > BYOK**, open the matching provider, and click <kbd className="key">Setup your own API key</kbd>.
  </Accordion>

  <Accordion title="Model not enabled">
    Some models require an explicit toggle in the **AI Gateway**. Search for the model id and enable it before invoking it.
  </Accordion>
</AccordionGroup>

## Capabilities

Pair your first request with built-in **AI Gateway** features.

<CardGroup cols={2}>
  <Card title="Multimodal" icon="layer-group" href="/docs/proxy/multimodal">
    Send text, images, audio, and PDFs through the same unified endpoint.
  </Card>

  <Card title="Streaming" icon="bolt" href="/docs/proxy/streaming">
    Stream tokens as they generate for real-time responses in your UI.
  </Card>

  <Card title="Fallbacks" icon="shuffle" href="/docs/proxy/retries">
    Automatically retry on a backup model when the primary fails or times out.
  </Card>

  <Card title="Identity tracking" icon="user-tag" href="/docs/proxy/identity-tracking">
    Attribute usage and cost to a specific end user or tenant.
  </Card>

  <Card title="Thread management" icon="comments" href="/docs/proxy/thread-management">
    Persist conversation history across requests with automatic thread storage.
  </Card>

  <Card title="Supported models" icon="list" href="/docs/proxy/supported-models">
    Browse supported models from **OpenAI**, **Anthropic**, **Google**, **AWS**, and more.
  </Card>
</CardGroup>
