On this pageAuthentication
Authentication
DocImprint ·
API key (monthly credits) or x402 USDC per call. Verify and download stay free.
API keys
Send Authorization: Bearer dr_live_... (or X-API-Key). Monthly quota and rate limits — no wallet handshake.
bashAPI key request
# Capture a document as a tamper-evident evidence bundle
curl -X POST "https://api.docimprint.com/v1/extract?sync=true" \
-H "Authorization: Bearer dr_live_..." \
-H "Content-Type: application/json" \
-d '{"source":"https://bitcoin.org/bitcoin.pdf","mode":"summarize"}'jsonQuota exceeded (HTTP 402)
{
"error": "Monthly quota exhausted",
"quota": { "used": 5000, "limit": 5000, "remaining": 0 },
"upgrade_url": "https://docimprint.com/pricing"
}Plans and rates: Pricing · Get API key
x402 pay-per-call
No account. First call returns 402 with USDC amount on Base; sign EIP-712, retry with X-Payment, get X-Payment-Receipt. Chain eip155:8453. Try both in Try live.
bashx402 handshake
# Every paid endpoint follows the same x402 handshake
# 1. First request → 402 Payment Required
# Response headers include payment amount, recipient, and network (Base / USDC)
curl -X POST https://api.docimprint.com/v1/extract \
-H "Content-Type: application/json" \
-d '{"source": "https://cdn.example.com/report.pdf", "mode": "summarize"}'
# 2. Sign an EIP-712 USDC transfer for the amount in the 402 headers
# Use x402-fetch (TypeScript), x402-client (Python), or manual signing
# 3. Retry with X-Payment header → 200 + result
curl -X POST https://api.docimprint.com/v1/extract \
-H "Content-Type: application/json" \
-H "X-Payment: <eip712-signed-usdc-transfer>" \
-d '{"source": "https://cdn.example.com/report.pdf", "mode": "summarize"}'
# Successful responses include X-Payment-Receipt with the on-chain tx hash.
# Mainnet: eip155:8453 (Base). Testnet playground uses eip155:84532 (Base Sepolia).Check your quota
GET /v1/quota — credits used, remaining, and reset_at. Always free.
bashCheck quota
# Check remaining credits — free, no quota consumed
curl https://api.docimprint.com/v1/quota \
-H "Authorization: Bearer dr_live_..."jsonResponse
{
"plan_id": "free",
"billing_period": "2026-05",
"credits_used": 23,
"monthly_credits": 100,
"remaining": 77,
"reset_at": "2026-06-01T00:00:00Z"
}Credits reset on the 1st of each month (UTC).
How does DocImprint authentication work?
Two paths: Authorization: Bearer dr_live_… for API keys with monthly credits, or x402 USDC micropayments on Base where wallet address becomes resource owner. Both work on every paid endpoint.