docimprint

← All docs

HTTP / SDK

DocImprint ·

How do I integrate DocImprint with Python or TypeScript?

Use REST with curl or fetch, or the @x402/fetch client for wallet-native payments. Python and TypeScript SDK examples are in /docs/integrations — all endpoints share the same POST /v1/extract envelope.

HTTP / SDK

No SDK required — any HTTP client works. Use x402 client libraries for automatic payment signing, or handle the 402 handshake manually. See Authentication for the full flow.

  1. Get a free API key
  2. Import the Postman collection (download below or paste the collection URL in Postman)
  3. Set collection variables API_KEY and optionally TARGET_URL

Postman collection

59 requests across the full API. Import into Postman, set API_KEY (dr_live_...), and run without the browser playground.

Run in PostmanEnv ↗

TypeScript / Node.js SDK

npm install docimprint

Typed wrappers for extract, summarize, QA, translate, claim-check, collections, and more.

npm ↗GitHub ↗
bash
# 1. Request — gateway responds with 402
curl -X POST https://api.docimprint.com/v1/extract \
  -H "Content-Type: application/pdf" \
  --data-binary @contract.pdf

# 2. Re-send with signed x402 payment
curl -X POST https://api.docimprint.com/v1/extract \
  -H "Content-Type: application/pdf" \
  -H "X-Payment: <eip712-signed-transfer>" \
  --data-binary @contract.pdf

Related