Returns JSON with PDF text extraction: the text of each page (first 20 pages) plus title, author and producer metadata.
Use when you need to extract text from a pdf, pdf to text or document parsing for an LLM.
Do not use for scanned PDFs (no OCR), password-protected files or files over 15 MB.
Price: 0.0025 USDC per page, up to 0.05 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 | 50000 atomic units (0.05 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 blackwood_pdf_extract. 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, e.g. https://example.com/report.pdf (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"
},
"next": {
"type": "object",
"properties": {
"service": {
"type": "string",
"description": "Service id of the suggested next paid call"
},
"tool": {
"type": "string",
"description": "MCP tool name of the same call"
},
"method": {
"type": "string",
"enum": [
"GET",
"POST"
]
},
"url": {
"type": "string",
"description": "Paid route of the next call"
},
"useWhen": {
"type": "string",
"description": "When the next call is the right one"
},
"sample": {
"type": "string",
"description": "Free fixed sample of the whole family"
}
},
"required": [
"service",
"tool",
"method",
"url",
"useWhen",
"sample"
],
"additionalProperties": false,
"description": "Suggested next paid call in the same family (call it in a loop when the task continues)"
}
},
"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