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.
ARouter는 API 요청에서 애플리케이션을 식별하는 선택적 HTTP 헤더를 지원합니다. 이 헤더는 ARouter Dashboard의 소스 추적에 사용되어 단일 계정 하의 여러 프로젝트 또는 워크플로우에 걸쳐 앱별 분석 및 사용량 분류를 제공합니다.
HTTP-Referer
애플리케이션의 URL. 요청의 소스를 식별하는 데 사용됩니다.
HTTP-Referer: https://myapp.com
X-Title
애플리케이션의 표시 이름. Dashboard 활동 보기에 표시됩니다.
ARouter API에 대한 모든 요청에 이 헤더를 포함합니다:
Python (OpenAI)
Node.js (OpenAI)
Go
cURL
fetch
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!"}],
)
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!" }],
});
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"),
)
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!"}]
}'
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!' }],
}),
});
앱 카테고리
ARouter의 분석에서 올바르게 표시되도록 애플리케이션을 분류합니다:
| 카테고리 | 설명 |
|---|
Coding | 개발 도구, IDE, 코드 어시스턴트 |
Creative | 작문, 이미지 생성, 아트 도구 |
Productivity | 문서 처리, 요약, 자동화 |
Research | 지식 검색, 분석, 학술 도구 |
Entertainment | 게임, 채팅, 롤플레이 |
Other | 위 항목에 해당하지 않는 것 |
X-Title 헤더의 일부로 카테고리를 전달하거나 통합에서 지원하는 경우 전용 헤더로 전달합니다. 카테고리는 앱 이름과 함께 Dashboard 분석에 표시됩니다.
Dashboard 활동
어트리뷰션 헤더를 포함하면 ARouter Dashboard에 다음이 표시됩니다:
- 앱 이름: 활동 피드 및 요청별 분석에 표시
- 소스 URL: 애플리케이션 도메인별로 요청을 그룹화하는 데 사용
- 카테고리: 앱 유형별 사용량 분류에 표시
- 앱별 사용량: 귀속된 앱의 Token 소비, 비용, 요청 볼륨
다음과 같은 경우에 특히 유용합니다:
- 하나의 계정 아래 여러 애플리케이션을 관리하는 경우
- 다른 앱 버전에서 A/B 테스트를 실행하는 경우
- 어떤 워크플로우가 가장 많은 사용량을 유발하는지 이해하는 경우
어트리뷰션의 이점
- 앱별 사용량 분류 — 어떤 애플리케이션이 가장 많은 Token과 비용을 소비하는지 확인
- 트래픽 분석 — 앱별 요청 볼륨 패턴 이해
- 최적화 신호 — 최적화를 위한 고비용 워크플로우 식별
어트리뷰션 헤더는 ARouter 측에서만 처리되며 모델 동작, 라우팅 또는 업스트림 제공업체에 영향을 미치지 않습니다.