Returns JSON with the text of each page of a PDF (first 20 pages) plus title, author and producer metadata.
Use when you need to extract text from a pdf for document parsing, search or an LLM and can poll an async job.
Do not use when the PDF is scanned (no OCR), password protected or over 15 MB.
Price: 0.01 USDC per page, up to 0.2 USDC per call; clients without upto pay the cap (x402, eip155:8453). Typical response time: 10000 ms (p95). Asynchronous: the paid call returns a jobId; polling is free.
POST https://x402-gateway.blackwoodstate8.workers.dev/v1/pdf-text. A request without payment gets 402 Payment Required with the
PAYMENT-REQUIRED header; any x402 client signs an EIP-3009 authorization and retries with
PAYMENT-SIGNATURE (or X-PAYMENT). Invalid input is answered with 400 and not charged.
curl -i -X POST https://x402-gateway.blackwoodstate8.workers.dev/v1/pdf-text -H 'content-type: application/json' -d '{"url":"https://pdfobject.com/pdf/sample.pdf"}'
| Pay to | 0x2b1CcDEc444AbEFEa996D5b472f3dfAaD0446a8b |
|---|---|
| Asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC) |
| Amount | 200000 atomic units (0.2 USDC) |
| Authorization window | 60 s |
| Poll (free) | GET https://x402-gateway.blackwoodstate8.workers.dev/v1/pdf-text/jobs/:jobId |
Streamable HTTP at https://x402-gateway.blackwoodstate8.workers.dev/mcp, tool pdf-text_v1. Payment goes in
_meta["x402/payment"]; without it the tool returns the payment requirements.
| Field | Type | Meaning |
|---|---|---|
url | string | Public http(s) URL of the PDF file (up to 15 MB) |
Example:
{
"url": "https://pdfobject.com/pdf/sample.pdf"
}
Real example of the paid response (the job ticket):
{
"jobId": "job_00000000000000000000000000000000",
"pollUrl": "https://gateway.example/v1/pdf-text/jobs/job_00000000000000000000000000000000",
"expiresAt": "2026-01-31T00:00:00.000Z",
"status": "queued"
}
{
"type": "object",
"properties": {
"jobId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"pollUrl": {
"type": "string",
"format": "uri"
},
"expiresAt": {
"type": "string",
"description": "ISO 8601: depois disso o resultado deixa de existir"
},
"status": {
"type": "string",
"const": "queued"
}
},
"required": [
"jobId",
"pollUrl",
"expiresAt",
"status"
],
"additionalProperties": false
}Free schema and example: GET https://x402-gateway.blackwoodstate8.workers.dev/v1/pdf-text.
OpenAPI 3.1 · llms.txt · All services