본문으로 건너뛰기

Claude API 가이드

Anthropic Claude는 Anthropic이 개발한 대규모 언어 모델로, 안전성과 유용성으로 잘 알려져 있습니다.

설치

pip install anthropic

기본 사용법

import anthropic

client = anthropic.Anthropic(
api_key="your-api-key",
base_url="https://aisupermarket.work",
)

message = client.messages.create(
model="claude-opus-4-7",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello, please introduce yourself"}
]
)

print(message.content[0].text)

주요 모델

모델설명
claude-opus-4-7복잡한 작업, 코딩, 에이전트에 적합한 최고 성능 모델
claude-opus-4-6이전 세대 주력 모델
claude-sonnet-4-6대부분의 시나리오에 적합한 속도와 성능의 균형 모델