{"x402Version":2,"resource":{"url":"https://schemasure.com/v2/extract-image","name":"schemasure: extract_image_to_schema","description":"Extract strict, JSON-Schema-valid typed JSON from a PNG, JPEG, or WebP document image. Failed extraction calls are not settled. Always-paid x402 V2 image API.","mimeType":"application/json","serviceName":"SchemaSure","tags":["x402","structured-output","ai-agents","structured-data","json","extraction","schema","json-schema","text-to-json","image-to-json","ocr","vision","data-cleaning","parsing","llm","agents"],"iconUrl":"https://schemasure.com/icon.svg","inputSchema":{"type":"object","additionalProperties":false,"required":["image","schema"],"properties":{"image":{"type":"object","additionalProperties":false,"required":["data","mimeType"],"properties":{"data":{"type":"string","minLength":1,"contentEncoding":"base64","description":"Base64-encoded image bytes without a data-URL prefix."},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp"],"description":"Declared image media type; it must match the decoded file signature."}}},"schema":{"type":"object","description":"JSON Schema (draft 2020-12) that the returned `data` is guaranteed to satisfy."},"options":{"type":"object","additionalProperties":false,"properties":{"maxRepairs":{"type":"integer","minimum":0,"maximum":5,"description":"Max validate->re-prompt repair iterations."},"strict":{"type":"boolean","default":true,"description":"Drop fields not present in the schema."}}}}},"outputSchema":{"type":"object","required":["data","meta"],"properties":{"data":{"description":"Extracted value; guaranteed to validate against the request `schema`."},"meta":{"type":"object","required":["repairs","latencyMs","validated"],"properties":{"repairs":{"type":"integer"},"latencyMs":{"type":"integer"},"validated":{"const":true},"deterministicFields":{"type":"array","items":{"type":"string"}}}}}},"examples":[{"request":{"image":{"data":"<base64-encoded PNG, JPEG, or WebP bytes>","mimeType":"image/png"},"schema":{"type":"object","additionalProperties":false,"required":["invoiceNumber","vendor","total"],"properties":{"invoiceNumber":{"type":"string","description":"Invoice identifier exactly as printed."},"vendor":{"type":"string"},"total":{"type":"number","description":"Final amount due as a number, without currency symbols."}}}},"response":{"data":{"invoiceNumber":"INV-2048","vendor":"Northstar Supplies","total":382.45},"meta":{"repairs":0,"latencyMs":910,"validated":true}}}]},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"30000","payTo":"0x9876af0F6D8Ed5155Cd02d1ca56D128601612690","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2"}}],"extensions":{"bazaar":{"info":{"input":{"type":"http","bodyType":"json","body":{"image":{"data":"<base64-encoded PNG, JPEG, or WebP bytes>","mimeType":"image/png"},"schema":{"type":"object","additionalProperties":false,"required":["invoiceNumber","vendor","total"],"properties":{"invoiceNumber":{"type":"string","description":"Invoice identifier exactly as printed."},"vendor":{"type":"string"},"total":{"type":"number","description":"Final amount due as a number, without currency symbols."}}}},"method":"POST"},"output":{"type":"json","example":{"data":{"invoiceNumber":"INV-2048","vendor":"Northstar Supplies","total":382.45},"meta":{"repairs":0,"latencyMs":910,"validated":true}}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","additionalProperties":false,"required":["image","schema"],"properties":{"image":{"type":"object","additionalProperties":false,"required":["data","mimeType"],"properties":{"data":{"type":"string","minLength":1,"contentEncoding":"base64","description":"Base64-encoded image bytes without a data-URL prefix."},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp"],"description":"Declared image media type; it must match the decoded file signature."}}},"schema":{"type":"object","description":"JSON Schema (draft 2020-12) that the returned `data` is guaranteed to satisfy."},"options":{"type":"object","additionalProperties":false,"properties":{"maxRepairs":{"type":"integer","minimum":0,"maximum":5,"description":"Max validate->re-prompt repair iterations."},"strict":{"type":"boolean","default":true,"description":"Drop fields not present in the schema."}}}}}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","required":["data","meta"],"properties":{"data":{"description":"Extracted value; guaranteed to validate against the request `schema`."},"meta":{"type":"object","required":["repairs","latencyMs","validated"],"properties":{"repairs":{"type":"integer"},"latencyMs":{"type":"integer"},"validated":{"const":true},"deterministicFields":{"type":"array","items":{"type":"string"}}}}}}},"required":["type"]}},"required":["input"]}}},"service":{"name":"schemasure","title":"SchemaSure — structured extraction","description":"Pay-per-call APIs that extract strict, JSON-Schema-valid typed JSON from unstructured text, HTML, or document images. Output is guaranteed to validate against the caller-supplied JSON Schema (Ajv, draft 2020-12) or the request returns a typed error and is not charged (charge-only-on-success). Both production services use x402 V2 with USDC on Base mainnet; the image service is always paid and has no V1 or free route. A legacy V1 text endpoint provides limited free evaluation calls. No signup, API keys, or account dashboard — built for autonomous AI agents.","category":"data-transformation","tags":["x402","structured-output","ai-agents","structured-data","json","extraction","schema","json-schema","text-to-json","image-to-json","ocr","vision","data-cleaning","parsing","llm","agents"],"icon":"https://schemasure.com/icon.svg","homepage":"https://schemasure.com","documentation":"https://schemasure.com/llms.txt","openapi":"https://schemasure.com/openapi.json","pricing":"https://schemasure.com/.well-known/pricing.json","benchmarks":"https://schemasure.com/.well-known/image-benchmarks.json","dataHandling":"https://schemasure.com/.well-known/data-handling.json","version":"0.2.0"},"payment":{"enabled":true,"protocol":"x402","protocolVersion":2,"priceUsd":0.03,"pricing":"$0.03/image, flat, failed calls free","chargeModel":"charge-only-on-success","freeCalls":0,"alwaysPaid":true,"v1Available":false}}