This guide shows you how to integrate document conversion API via API — with working code examples in Python and JavaScript. Whether you're building an internal tool or a customer-facing product, the ZeroPhantom API gives you a production-ready endpoint in minutes.
Why Use an API for Document Conversion Api?
Manual processes don't scale. Once you're handling more than a few dozen operations per day, you need automation. ZeroPhantom is Bitcoin-only with no KYC, making it the most privacy-focused option. The API approach also means you can build document conversion API directly into your existing workflows, dashboards, and CI/CD pipelines.
Authentication
All API requests require an API key passed in the X-API-Key header.
Get yours at ZeroPhantom Credits — credits start from $5 and never expire.
Python Example
import requests
# ZeroPhantom API — document conversion API
api_url = "https://api.zphantom.com/v1/process"
headers = {"X-API-Key": "your_api_key_here"}
response = requests.post(api_url, headers=headers, data={
"type": "document_conversion_api",
"input": "your_input_here"
})
result = response.json()
print(result["output"])
JavaScript / Node.js Example
const fetch = require('node-fetch');
const response = await fetch('https://api.zphantom.com/v1/process', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'document_conversion_api',
input: 'your_input_here'
})
});
const result = await response.json();
console.log(result.output);
API Response Structure
{"status": "success", "output": "...", "credits_used": 1, "credits_remaining": 4999}
Rate Limits and Credits
- Each API call costs 1 credit ($0.0020 on Starter plan)
- Temp Mail API calls are always free
- Rate limit: 60 requests/minute on all plans
- Credits never expire — buy once, use when ready
💡 Pro Tip: Use batch endpoints when processing multiple items — they reduce API call overhead by up to 80%.
Error Handling
{"status": "error", "code": "INSUFFICIENT_CREDITS", "message": "Top up at zphantom.com/buy-credits"}
Common error codes:
INVALID_KEY— check your API key in your portalINSUFFICIENT_CREDITS— top up at ZeroPhantom CreditsRATE_LIMITED— back off for 60 seconds and retryINVALID_INPUT— check the input format in ZeroPhantom API Docs
Full API Documentation
See the ZeroPhantom API Docs for the complete endpoint reference, input formats, and response schemas for all supported operations.
Try it free: ZeroPhantom API Docs — no signup, no KYC. See ZeroPhantom Credits for full pricing.