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

# App Attribution

> Identify your application in API requests using HTTP headers. Power your Dashboard analytics and app-level usage breakdowns.

ARouter supports optional HTTP headers that identify your application in API requests. These headers are used for source tracking in the ARouter Dashboard — giving you per-app analytics and usage breakdowns across multiple projects or workflows under a single account.

## Headers

### `HTTP-Referer`

Your application's URL. Used to identify the source of the request.

```
HTTP-Referer: https://myapp.com
```

### `X-Title`

Your application's display name. Shows up in your Dashboard activity view.

```
X-Title: My AI App
```

## Implementation

Include these headers in any request to the ARouter API:

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

    client = OpenAI(
        base_url="https://api.arouter.ai/v1",
        api_key="lr_live_xxxx",
        default_headers={
            "HTTP-Referer": "https://myapp.com",
            "X-Title": "My AI App",
        },
    )

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

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

    const client = new OpenAI({
      baseURL: "https://api.arouter.ai/v1",
      apiKey: "lr_live_xxxx",
      defaultHeaders: {
        "HTTP-Referer": "https://myapp.com",
        "X-Title": "My AI App",
      },
    });

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

  <Tab title="Go">
    ```go theme={null}
    client := arouter.NewClient("lr_live_xxxx",
        arouter.WithBaseURL("https://api.arouter.ai/v1"),
        arouter.WithHeader("HTTP-Referer", "https://myapp.com"),
        arouter.WithHeader("X-Title", "My AI App"),
    )
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.arouter.ai/v1/chat/completions \
      -H "Authorization: Bearer lr_live_xxxx" \
      -H "HTTP-Referer: https://myapp.com" \
      -H "X-Title: My AI App" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai/gpt-5.4",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'
    ```
  </Tab>

  <Tab title="fetch">
    ```typescript theme={null}
    const response = await fetch('https://api.arouter.ai/v1/chat/completions', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer lr_live_xxxx',
        'HTTP-Referer': 'https://myapp.com',
        'X-Title': 'My AI App',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        model: 'openai/gpt-5.4',
        messages: [{ role: 'user', content: 'Hello!' }],
      }),
    });
    ```
  </Tab>
</Tabs>

## App Categories

Categorize your application to appear correctly in ARouter's analytics:

| Category        | Description                                    |
| --------------- | ---------------------------------------------- |
| `Coding`        | Developer tools, IDEs, code assistants         |
| `Creative`      | Writing, image generation, art tools           |
| `Productivity`  | Document processing, summarization, automation |
| `Research`      | Knowledge retrieval, analysis, academic tools  |
| `Entertainment` | Games, chat, roleplay                          |
| `Other`         | Anything that doesn't fit the above            |

Pass the category as part of your `X-Title` header or as a dedicated header if supported by your integration. The category appears in your Dashboard analytics alongside the app name.

## Dashboard Activity

When you include attribution headers, the ARouter Dashboard displays:

* **App Name**: Shown in the activity feed and analytics per request
* **Source URL**: Used to group requests by application domain
* **Category**: Appears in usage breakdowns by app type
* **Per-app usage**: Token consumption, cost, and request volume per attributed app

This is especially useful when:

* Managing multiple applications under one account
* Running A/B tests across different app versions
* Understanding which workflows drive the most usage

## Benefits of Attribution

* **Usage breakdown by app** — See which of your applications consumes the most tokens and cost
* **Traffic analysis** — Understand request volume patterns per app
* **Optimization signals** — Identify high-cost workflows for optimization

Attribution headers are ARouter-side only and do not affect model behavior, routing, or the upstream provider.
