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

# Provider integrations

> Select a workspace provider integration per request with the x-orq-integration-<provider> header. Pass an integration id or its exact display name.

Send `x-orq-integration-<provider>` to choose which connected integration the **AI Gateway** uses for that provider. The value is the integration id or its exact display name. A model that already pins an integration keeps that integration.

## Overview

Each provider can have more than one integration in a workspace. Without this header, a request uses the integration id on the request when one is set, then the provider's default integration. The header applies when the model does not pin an integration and the request does not include a provider credential of its own.

The `<provider>` segment is the integration identifier, such as `anthropic`, `openai`, `google`, or `google-ai`. It matches the provider on the model being called. A header for one provider does not change the integration used for another provider in the same request, including fallbacks.

Names are unique for a provider inside a workspace. Two integrations for the same provider cannot share a display name.

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/chat/completions \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -H "x-orq-integration-openai: Production" \
    -d '{
      "model": "openai/gpt-4o",
      "messages": [{ "role": "user", "content": "Summarize the repository." }]
    }'
  ```

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

  const client = new OpenAI({
    apiKey: process.env.ORQ_API_KEY,
    baseURL: "https://my.orq.ai/v3/router",
    defaultHeaders: {
      "x-orq-integration-openai": "Production",
    },
  });

  const response = await client.chat.completions.create({
    model: "openai/gpt-4o",
    messages: [{ role: "user", content: "Summarize the repository." }],
  });
  ```

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

  client = OpenAI(
      api_key=os.environ["ORQ_API_KEY"],
      base_url="https://my.orq.ai/v3/router",
      default_headers={"x-orq-integration-openai": "Production"},
  )

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

## Configuration

| Header | Value | Description |
| - | - | - |
| `x-orq-integration-<provider>` | Integration id or exact display name | Selects the workspace integration for that provider. |

One header per provider. `x-orq-integration-anthropic` and `x-orq-integration-google` can be sent on the same request. A header for a provider the request does not call is ignored.

| Result | When |
| - | - |
| `400` | The header for a provider on the request is empty, or no integration in the workspace has that id or exact display name. |
| `409` | More than one integration for that provider has the same display name. Send the integration id. |

## Claude Code

**Claude Code** forwards extra headers through `ANTHROPIC_CUSTOM_HEADERS`. Keep `x-orq-api-key` when the session uses an Anthropic credential, and add the integration header on its own line:

```bash Shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
export ANTHROPIC_BASE_URL="https://my.orq.ai/v3/anthropic"
export ANTHROPIC_MODEL="anthropic/claude-sonnet-4-6"
export ANTHROPIC_CUSTOM_HEADERS="x-orq-api-key: $ORQ_API_KEY"$'\n'"x-orq-integration-anthropic: Production"
```

When the **Orq.ai** key is the Anthropic client credential, the integration header is enough:

```bash Shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
export ANTHROPIC_BASE_URL="https://my.orq.ai/v3/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ORQ_API_KEY"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL="anthropic/claude-sonnet-4-6"
export ANTHROPIC_CUSTOM_HEADERS="x-orq-integration-anthropic: Production"
```

An Anthropic API key or Claude subscription credential on the request is still the credential for that call. The header selects a workspace integration when the request uses the workspace's Anthropic integration.

## generateContent

Bare Gemini model ids on `https://my.orq.ai/v3/google` resolve as `google/<model>`, so the header is `x-orq-integration-google`. Google AI Studio integrations use the identifier `google-ai` and the header `x-orq-integration-google-ai` when the model provider is `google-ai`.

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { GoogleGenAI } from "@google/genai";

  const client = new GoogleGenAI({
    apiKey: process.env.ORQ_API_KEY,
    httpOptions: {
      baseUrl: "https://my.orq.ai/v3/google",
      headers: {
        "x-orq-integration-google": "Production",
      },
    },
  });

  const response = await client.models.generateContent({
    model: "gemini-2.5-flash",
    contents: "Explain the repository structure.",
  });
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os
  from google import genai
  from google.genai import types

  client = genai.Client(
      api_key=os.environ["ORQ_API_KEY"],
      http_options=types.HttpOptions(
          base_url="https://my.orq.ai/v3/google",
          headers={"x-orq-integration-google": "Production"},
      ),
  )

  response = client.models.generate_content(
      model="gemini-2.5-flash",
      contents="Explain the repository structure.",
  )
  ```
</CodeGroup>

## Limitations

| Limitation | Impact | Workaround |
| - | - | - |
| A model pins an integration | The header for that provider is ignored for that model | Change the integration on the model, or call a model that does not pin one |
| The request includes a provider credential | That credential is used for the call | Omit the provider credential to select a workspace integration |
| Display names must match exactly | `Production` does not match `production` | Send the integration id, or the display name as stored |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.