Everything you need to integrate Dokyumi into your application.
All API requests require an API key passed as a Bearer token in the Authorization header.
Authorization: Bearer dk_live_your_api_key_here
Generate API keys in your dashboard.
Extract structured data from a document using a predefined schema.
Send a multipart/form-data request with:
| Field | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | PDF, PNG, JPG, or TIFF document |
| schema | String | No | Schema slug. If omitted, uses your first active schema. |
curl -X POST https://dokyumi.com/api/v1/extract \ -H "Authorization: Bearer dk_live_your_api_key" \ -F "file=@invoice.pdf" \ -F "schema=invoice-parser"
const formData = new FormData()
formData.append('file', fileInput.files[0])
formData.append('schema', 'invoice-parser')
const response = await fetch('https://dokyumi.com/api/v1/extract', {
method: 'POST',
headers: {
'Authorization': 'Bearer dk_live_your_api_key'
},
body: formData
})
const result = await response.json()
console.log(result.data)import requests
response = requests.post(
'https://dokyumi.com/api/v1/extract',
headers={'Authorization': 'Bearer dk_live_your_api_key'},
files={'file': open('invoice.pdf', 'rb')},
data={'schema': 'invoice-parser'}
)
result = response.json()
print(result['data']){
"id": "ext_abc123",
"status": "completed",
"schema": "invoice-parser",
"data": {
"vendor_name": "Acme Corp",
"invoice_number": "INV-2026-001",
"invoice_date": "2026-02-12",
"total_amount": 1250.00,
"line_items": [
{
"description": "Consulting Services",
"quantity": 10,
"unit_price": 125.00,
"amount": 1250.00
}
]
},
"confidence": {
"vendor_name": 0.98,
"invoice_number": 0.95,
"invoice_date": 0.99,
"total_amount": 0.97,
"line_items": 0.88
},
"validation": {
"valid": true,
"errors": [],
"low_confidence_fields": []
},
"meta": {
"processing_time_ms": 3420,
"page_count": 1,
"ocr_cached": false,
"model": "claude-sonnet-4-20250514"
}
}List all schemas available to your API key.
curl https://dokyumi.com/api/v1/schemas \ -H "Authorization: Bearer dk_live_your_api_key"
| Plan | Extractions/mo | Requests/min | Schemas |
|---|---|---|---|
| Free | 100 | 10 | 2 |
| Starter ($49/mo) | 2,000 | 60 | 10 |
| Growth ($249/mo) | 20,000 | 120 | 50 |
White-label sites can send extraction results to your webhook URL. Configure webhooks in your site settings.
Webhooks include an HMAC-SHA256 signature in the X-Dokyumi-Signature header.
// Verify webhook signature (Node.js)
const crypto = require('crypto')
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex')
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
)
}Need help? Email cm@soxoa.com