Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
API 키 설정
API 키를 환경 변수로 내보내세요. SDK는 ANTHROPIC_API_KEY를 자동으로 읽습니다.
export ANTHROPIC_API_KEY="your-api-key-here"프로젝트 생성 및 SDK 설치
mkdir claude-quickstart && cd claude-quickstart
python3 -m venv .venv && source .venv/bin/activate
pip install anthropic코드 작성
quickstart.py라는 파일을 생성하세요:
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-5",
max_tokens=1000,
messages=[
{
"role": "user",
"content": "What should I search for to find the latest developments in renewable energy?",
}
],
)
for block in message.content:
if block.type == "text":
print(block.text)코드 실행
python quickstart.pyHere are some effective search strategies to find the latest developments in renewable energy:
## General Search Terms
- "Renewable energy news 2025"
- ...첫 API 호출을 완료했습니다. 다음으로, 모든 Claude 통합에서 사용하게 될 Messages API 패턴을 알아보세요.
멀티턴 대화, 시스템 프롬프트, 중지 이유 및 기타 핵심 패턴을 알아보세요.
기본 사항에 익숙해지면 더 자세히 살펴보세요:
기능과 비용별로 Claude 모델을 비교하세요.
도구, 컨텍스트 관리, 구조화된 출력 등 모든 Claude 기능을 살펴보세요.
Python, TypeScript, C# 및 기타 클라이언트 라이브러리에 대한 참조 문서입니다.
Was this page helpful?