메인 콘텐츠로 건너뛰기

Documentation Index

Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt

Use this file to discover all available pages before exploring further.

개요

Anthropic API 생태계를 활용하려는 개발자들의 요구를 충족시키기 위해, 저희 API는 이제 Anthropic API 인터페이스를 통한 모든 모델 액세스를 지원합니다.
200개 이상의 LLM을 지원하며, 그중 7개의 무료 모델이 포함되어 있습니다.

빠른 시작

Anthropic SDK 설치

pip install -U anthropic

API 사용법

엔드포인트: https://aihubmix.com/v1/messages
curl https://aihubmix.com/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: <AIHUBMIX_API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "minimax-m2.1",
    "max_tokens": 16000,
    "thinking": {
      "type": "enabled",
      "budget_tokens": 10000
    },
    "messages": [
      {
        "role": "user",
        "content": "Are there an infinite number of prime numbers such that n mod 4 == 3?"
      }
    ]
  }'

호환성 참고 사항

지원되는 파라미터

Anthropic API를 통한 통합 시 다음 입력 파라미터를 지원합니다:
파라미터타입필수설명
modelstring지원되는 모델은 모델 목록에서 확인할 수 있습니다
messagesarray of MessageParam입력 메시지
max_tokensnumber아니오생성할 최대 토큰 수
streamboolean아니오스트리밍 응답 활성화
systemstring or array of TextBlockParam시스템 프롬프트
temperaturenumber아니오범위: (0.0, 1.0]. 출력 무작위성을 제어하며, 권장 값은 1입니다
top_pnumber아니오누클리어스 샘플링 파라미터
thinkingThinkingConfigParam아니오추론 구성

지원되는 메시지 타입

타입설명
type="text"텍스트 메시지
type="tool_use"도구 호출
type="tool_result"도구 호출 결과
type="thinking"모델 추론 출력

사용 예시

Claude Code에서 GPT-5.2 사용

지원되는 모든 모델을 AIHubMix를 통해 사용할 수 있지만, 최상의 경험을 위해 gpt-5.2 또는 glm-4.7과 같은 고성능 모델을 권장합니다.

1. Claude Code 설치 및 구성

Claude Code 설치 가이드를 참조하세요: https://docs.aihubmix.com/cn/api/Claude-Code

2. Claude Code를 AIHubMix에 연결

Claude 구성 파일: .claude/settings.json
{
  "env": {
    "ANTHROPIC_API_KEY": "AIHUBMIX_API_KEY",
    "ANTHROPIC_BASE_URL": "https://aihubmix.com",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-5.2",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-5.2",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-5.2",
    "ANTHROPIC_MODEL": "gpt-5.2"
  },
  "includeCoAuthoredBy": false
}
AIHUBMIX_API_KEY를 실제 AIHubMix API 키로 교체하세요.
네이티브 Claude Code 설치 프로그램은 표준 .env 파일을 읽을 수 없습니다. 이러한 설정을 .env 파일에 배치하지 마세요.

3. 대화 시작

프로젝트 디렉토리로 이동한 다음 Claude Code를 실행하세요:
$ cd /path/to/your-project
> claude
성공적으로 연결되면 보내는 모든 프롬프트가 AIHubMix를 통해 라우팅됩니다.

4. 검증

Claude Code에서 /status 명령을 실행하여 연결을 확인할 수 있습니다:
> /status

 API key: ANTHROPIC_API_KEY
 Anthropic base URL: https://aihubmix.com

 Model: gpt-5.2

마지막 업데이트: 2026-06-01