메인 콘텐츠로 건너뛰기
ARouter는 단일 통합 API를 통해 주요 제공업체의 수백 개 모델에 대한 액세스를 제공합니다. ARouter 웹사이트에서 모델을 탐색하거나 API를 직접 사용할 수 있습니다.

쿼리 파라미터

Models API는 결과 필터링을 위한 쿼리 파라미터를 지원합니다.

output_modalities

출력 능력으로 모델을 필터링합니다. 쉼표로 구분된 모달리티 목록이나 "all"을 사용하여 모든 모델을 포함할 수 있습니다.
설명
text텍스트 출력을 생성하는 모델(기본값)
image이미지를 생성하는 모델
audio오디오 출력을 생성하는 모델
embeddings임베딩 모델
all모든 모델 포함, 모달리티 필터링 건너뜀
# 기본 — 텍스트 모델만
curl "https://api.arouter.ai/v1/models" \
  -H "Authorization: Bearer lr_live_xxxx"

# 이미지 생성 모델만
curl "https://api.arouter.ai/v1/models?output_modalities=image" \
  -H "Authorization: Bearer lr_live_xxxx"

# 텍스트 및 이미지 모델
curl "https://api.arouter.ai/v1/models?output_modalities=text,image" \
  -H "Authorization: Bearer lr_live_xxxx"

# 모달리티 관계없이 모든 모델
curl "https://api.arouter.ai/v1/models?output_modalities=all" \
  -H "Authorization: Bearer lr_live_xxxx"

supported_parameters

지원하는 API 파라미터로 모델을 필터링합니다. 예를 들어, 도구 호출을 지원하는 모델을 찾으려면:
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"

모델 목록

GET /v1/models
API key로 사용 가능한 전체 모델 목록을 반환합니다.
curl https://api.arouter.ai/v1/models \
  -H "Authorization: Bearer lr_live_xxxx"

응답 형식

{
  "data": [
    {
      "id": "openai/gpt-5.4",
      "canonical_slug": "openai/gpt-5.4",
      "name": "GPT-5.4",
      "created": 1748000000,
      "description": "OpenAI's flagship multimodal model with state-of-the-art performance.",
      "context_length": 128000,
      "architecture": {
        "input_modalities": ["text", "image"],
        "output_modalities": ["text"],
        "tokenizer": "cl100k_base",
        "instruct_type": "chatml"
      },
      "pricing": {
        "prompt": "0.000005",
        "completion": "0.000015",
        "request": "0",
        "image": "0.00765",
        "web_search": "0",
        "internal_reasoning": "0",
        "input_cache_read": "0.0000025",
        "input_cache_write": "0.000005"
      },
      "top_provider": {
        "context_length": 128000,
        "max_completion_tokens": 16384,
        "is_moderated": true
      },
      "supported_parameters": [
        "tools",
        "tool_choice",
        "max_tokens",
        "temperature",
        "top_p",
        "structured_outputs",
        "response_format",
        "stop",
        "frequency_penalty",
        "presence_penalty",
        "seed"
      ],
      "per_request_limits": null,
      "default_parameters": null,
      "expiration_date": null
    }
  ]
}

모델 객체 스키마

data 배열의 각 모델에는 다음 필드가 포함됩니다:
필드타입설명
idstringAPI 요청에 사용되는 고유 모델 식별자(예: "openai/gpt-5.4"
canonical_slugstring변경되지 않는 모델의 영구 슬러그
namestring사람이 읽을 수 있는 표시 이름
creatednumber모델이 ARouter에 추가된 Unix 타임스탬프
descriptionstring모델 기능에 대한 상세 설명
context_lengthnumber토큰 단위의 최대 컨텍스트 창 크기
architectureArchitecture기술 능력 객체
pricingPricing이 모델 사용의 비용 구조(USD/토큰)
top_providerTopProvider기본 제공업체의 구성 세부 정보
per_request_limitsobject | null속도 제한 정보(제한 없는 경우 null
supported_parametersstring[]지원되는 API 파라미터 배열
default_parametersobject | null기본 파라미터 값(없는 경우 null
expiration_datestring | null지원 종료 날짜(지원 종료되지 않은 경우 null

Architecture 객체

{
  "input_modalities": string[],  // 예: ["text", "image"]
  "output_modalities": string[], // 예: ["text"]
  "tokenizer": string,           // 예: "cl100k_base"
  "instruct_type": string | null // 예: "chatml", 해당 없을 경우 null
}

Pricing 객체

모든 가격 값은 USD/토큰입니다. "0" 값은 해당 기능이 무료임을 의미합니다.
{
  "prompt": string,              // 입력 토큰당 비용
  "completion": string,          // 출력 토큰당 비용
  "request": string,             // API 요청당 고정 비용
  "image": string,               // 이미지 입력당 비용
  "web_search": string,          // 웹 검색 작업당 비용
  "internal_reasoning": string,  // 내부 추론 토큰 비용
  "input_cache_read": string,    // 캐시된 입력 토큰 읽기당 비용
  "input_cache_write": string    // 캐시된 입력 토큰 쓰기당 비용
}

Top Provider 객체

{
  "context_length": number,         // 제공업체별 컨텍스트 제한
  "max_completion_tokens": number,  // 응답의 최대 토큰 수
  "is_moderated": boolean           // 콘텐츠 중재 적용 여부
}

지원되는 파라미터

supported_parameters 배열은 모델에서 작동하는 OpenAI 호환 파라미터를 나열합니다:
파라미터설명
tools함수 호출 기능
tool_choice도구 선택 제어
max_tokens응답 길이 제한
temperature무작위성 제어
top_p핵 샘플링
reasoning내부 추론 모드
include_reasoning응답에 추론 포함
structured_outputsJSON 스키마 강제
response_format출력 형식 지정
stop사용자 정의 중지 시퀀스
frequency_penalty반복 감소
presence_penalty주제 다양성
seed결정론적 출력

모델 사용

id를 요청의 model 필드에 직접 사용하세요:
from openai import OpenAI

client = OpenAI(
    base_url="https://api.arouter.ai/v1",
    api_key="lr_live_xxxx",
)

# List available models
models = client.models.list()
for model in models.data:
    print(model.id)

# Use a specific model
response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4.6",
    messages=[{"role": "user", "content": "Hello!"}],
)

지원되는 파라미터로 필터링

도구 호출을 지원하는 모델 찾기:
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"
구조화된 출력을 지원하는 모델 찾기:
curl "https://api.arouter.ai/v1/models?supported_parameters=structured_outputs" \
  -H "Authorization: Bearer lr_live_xxxx"

자동 라우팅

특정 모델 ID 외에도, ARouter는 자동 모델 선택을 지원합니다:
모델설명
"auto"ARouter가 요청에 가장 적합한 모델을 자동으로 선택
curl https://api.arouter.ai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello!"}]}'
응답의 model 필드는 항상 실제로 사용된 모델을 표시합니다. 자세한 내용은 모델 라우팅을 참조하세요.

모델 변형

모델 ID에 접미사를 추가하여 라우팅 동작을 변경할 수 있습니다:
접미사효과
:nitro최고 처리량 인스턴스로 라우팅 — 속도 최적화
:floor최저 비용 인스턴스로 라우팅 — 가격 최적화
:free무료 티어 인스턴스로 라우팅(속도 제한 적용)
:thinking확장 추론 / 사고 연쇄 모드 활성화
{"model": "openai/gpt-5.4:nitro"}   // 가장 빠름
{"model": "openai/gpt-5.4:floor"}   // 가장 저렴
{"model": "deepseek/deepseek-r1:thinking"} // 추론 모드
전체 참조는 모델 변형을 참조하세요.

토큰화

모델마다 텍스트를 토큰화하는 방식이 다릅니다. 일부 모델(GPT, Claude, Llama)은 텍스트를 다중 문자 청크로 분할하고, 다른 모델은 문자별로 토큰화합니다(PaLM). 이는 동일한 입력과 출력이라도 모델마다 토큰 수——따라서 비용——가 다를 수 있다는 것을 의미합니다. 비용은 사용 중인 모델의 토크나이저에 따라 청구됩니다. 각 응답의 usage 필드를 사용하여 정확한 토큰 수를 확인하세요:
{
  "usage": {
    "prompt_tokens": 42,
    "completion_tokens": 128,
    "total_tokens": 170
  }
}

참고 사항

  • 모델 목록은 계정에서 활성화된 제공업체로 필터링됩니다. 제공업체가 활성화되지 않은 경우 해당 모델은 표시되지 않습니다.
  • 새 모델은 제공업체가 출시할 때 자동으로 추가됩니다.
  • 이 목록의 모델 ID를 채팅 완성 요청의 model 필드에 직접 사용하세요.
사용 가능한 제공업체와 플래그십 모델의 큐레이션 목록은 제공업체를 참조하세요.