Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
Claude PDF 支持
截至 2026 年 3 月 23 日,Crazyrouter 生产环境已验证 claude-sonnet-4-6 可以通过原生 Messages API 读取 Base64 PDF,并返回文本摘要。
已验证的最小请求
curl https://crazyrouter.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 512,
"messages": [
{
"role": "user",
"content": [
{
"type": "document",
"source": {
"type": "base64",
"media_type": "application/pdf",
"data": "JVBERi0xLjQK..."
}
},
{
"type": "text",
"text": "Summarize the document in one sentence."
}
]
}
]
}'
生产环境实际返回的关键形态:
{
"model": "claude-sonnet-4-6",
"content": [
{
"type": "text",
"text": "The document is a simple Crazyrouter PDF test document..."
}
]
}
当前页面只保留了 Base64 PDF 这条已复测成功的输入路径。远程 URL、多 PDF 对比、流式 PDF 输出等更复杂场景,本轮没有逐项复测。