Documentation Index
Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt
Use this file to discover all available pages before exploring further.
권장 엔드포인트
최소한의 요청
{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1600,
"thinking": {
"type": "enabled",
"budget_tokens": 2048
},
"messages": [
{
"role": "user",
"content": [{ "type": "text", "text": "Compare three cache architectures and recommend one." }]
}
]
}
cURL 예
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1600,
"thinking": {
"type": "enabled",
"budget_tokens": 2048
},
"messages": [
{
"role": "user",
"content": [{ "type": "text", "text": "Compare three cache architectures and recommend one." }]
}
]
}'
파이썬 예제
from anthropic import Anthropic
client = Anthropic(api_key="<ANTHROPIC_API_KEY>")
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1600,
thinking={
"type": "enabled",
"budget_tokens": 2048,
},
messages=[
{
"role": "user",
"content": [{"type": "text", "text": "Compare three cache architectures and recommend one."}],
}
],
)
print(response.content[0].text)
Node.js 예
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 1600,
thinking: {
type: "enabled",
budget_tokens: 2048
},
messages: [
{
role: "user",
content: [{ type: "text", text: "Compare three cache architectures and recommend one." }]
}
]
});
console.log(response.content[0].text);
모범 사례
- 정말 어려운 추론 작업에 대해서만 사고 활성화
- 더 작은
budget_tokens 값으로 시작하세요.
- 나중에 도구가 포함되는 경우 스트림 파서가 사고 이벤트도 지원하는지 확인하세요.