curl --request POST \
--url https://api.example.com/v1/ocr从 PDF 文件和图像中提取文本
curl --request POST \
--url https://api.example.com/v1/ocrcurl -X POST https://api.dedaluslabs.ai/v1/ocr \
-H "Authorization: Bearer $DEDALUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mistral-ocr-latest",
"document": {
"type": "document_url",
"document_url": "https://arxiv.org/pdf/1706.03762"
}
}'
data:application/pdf;base64, {base64_data}{
"pages": [
{
"index": 0,
"markdown": "# Attention Is All You Need\n\nAshish Vaswani, Noam Shazeer...\n\n# Abstract\n\nThe dominant sequence transduction models..."
},
{
"index": 1,
"markdown": "## 1 Introduction\n\nRecurrent neural networks..."
}
],
"model": "mistral-ocr-latest"
}
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
model | string | 否 | OCR 模型。默认值:mistral-ocr-latest |
document.type | string | 是 | 固定为 document_url |
document.document_url | string | 是 | HTTPS URL 或 data URI |
此页面对您有帮助吗?