{"openapi":"3.1.0","info":{"title":"Doc2JSON.de","description":"Parse unstructured (German) PDF documents into any agent-defined JSON schema. Pay per call with USDC via x402.","contact":{"name":"Doc2JSON.de","email":"paulos@voiceagenten.com"},"version":"0.1.0","x-guidance":"Start with POST /v1/extract. Send a JSON body with 'document_url' (public https URL of a PDF) and 'schema' (a JSON Schema object describing the fields you want). The first call returns HTTP 402 with an x402 PAYMENT-REQUIRED header; pay 0.03 USDC on Base (eip155:8453) via the x402 protocol (e.g. @x402/fetch) and retry. The 200 response contains 'data' matching your schema exactly (OpenAI strict structured outputs). German number formats are normalized to JSON numbers, dates to ISO 8601. Scanned/image-only PDFs are rejected with 422 and are not charged."},"paths":{"/v1/extract":{"post":{"summary":"Extract","description":"Kern-Endpunkt (F-1): PDF → beliebiges JSON-Schema.","operationId":"extract_v1_extract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"x402":{}}]}}},"/":{"get":{"summary":"Index","description":"Freier Info-Endpunkt für Menschen und Agenten.","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ExtractRequest":{"properties":{"document_url":{"type":"string","title":"Document Url","description":"Public URL of the PDF to parse"},"schema":{"additionalProperties":true,"type":"object","title":"Schema","description":"Target JSON Schema for the extracted data"}},"type":"object","required":["document_url","schema"],"title":"ExtractRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ExtractResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"payment_verified":{"type":"boolean"},"data":{"type":"object","description":"Extracted data, conforming exactly to the JSON schema provided in the request body.","additionalProperties":true}},"required":["status","data"]}}},"servers":[{"url":"https://api.doc2json.de","description":"Production"}]}