SchemaSure Image extraction · x402 V2 API
The Image extraction · x402 V2 API from SchemaSure — 1 operation(s) for image extraction · x402 v2.
The Image extraction · x402 V2 API from SchemaSure — 1 operation(s) for image extraction · x402 v2.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/schemasure:schemasure-image-extraction-x402-v2-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SchemaSure — structured extraction Image extraction · x402…
version: 0.2.0
summary: Turn messy text, HTML, or document images into guaranteed schema-valid JSON, or pay nothing. SchemaSure V2 is the primary production API.
description: Pay-per-call APIs that extract strict, JSON-Schema-valid typed JSON from unstructured text, HTML, or document images.
contact:
name: SchemaSure
url: https://schemasure.com
servers:
- url: https://schemasure.com
tags:
- name: Image extraction · x402 V2
paths:
/v2/extract-image:
post:
operationId: extract_image_to_schema
tags:
- Image extraction · x402 V2
summary: Extract schema-valid JSON from a document image with x402 V2
description: Always paid from the first call, with no V1 or free image route. Send base64-encoded PNG, JPEG, or WebP bytes plus a JSON Schema. Decode the PAYMENT-REQUIRED response header, sign the live terms, and retry the identical request with PAYMENT-SIGNATURE. The server verifies first and settles only after producing schema-valid JSON. Image bytes are processed transiently and are not persisted by SchemaSure.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImageExtractRequest'
example:
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.
responses:
'200':
description: Schema-valid extraction. Paid responses include PAYMENT-RESPONSE.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
PAYMENT-RESPONSE:
description: Base64-encoded x402 settlement receipt.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/ExtractSuccess'
example:
data:
invoiceNumber: INV-2048
vendor: Northstar Supplies
total: 382.45
meta:
repairs: 0
latencyMs: 910
validated: true
'400':
description: Bad request, unsupported input, invalid JSON Schema, or decoded input too large; fix before retrying. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Payment required or invalid. Decode PAYMENT-REQUIRED, sign, and retry with PAYMENT-SIGNATURE.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
PAYMENT-REQUIRED:
required: true
description: Base64-encoded x402 V2 PaymentRequired object, including Bazaar metadata.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'413':
description: Encoded HTTP request body is too large; reduce it before retrying. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Could not produce schema-valid output; change the input/schema or use a fallback. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. Wait for Retry-After before retrying. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
Retry-After:
description: Seconds until a retry is allowed.
schema:
type: integer
minimum: 1
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Unexpected server error. Retry once with backoff, then report X-Request-ID. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'502':
description: Inference or payment upstream unavailable. Retry with bounded exponential backoff. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'504':
description: Extraction timed out. Retry with bounded exponential backoff. Not settled.
headers:
X-Request-ID:
description: Correlation identifier to include when contacting support.
schema:
type: string
format: uuid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-x402-flow:
initialResponse: 402 + PAYMENT-REQUIRED
retryHeader: PAYMENT-SIGNATURE
successHeader: PAYMENT-RESPONSE
network: eip155:8453
x-image:
acceptedMimeTypes:
- image/png
- image/jpeg
- image/webp
maxDecodedBytes: 8388608
encoding: base64
components:
schemas:
ExtractSuccess:
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
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
enum:
- BAD_REQUEST
- INVALID_SCHEMA
- INPUT_TOO_LARGE
- UNSUPPORTED_INPUT_TYPE
- FETCH_BLOCKED
- EXTRACTION_FAILED
- VALIDATION_FAILED
- ABSTAINED
- UPSTREAM_LLM_ERROR
- TIMEOUT
- RATE_LIMITED
- PAYMENT_REQUIRED
- PAYMENT_INVALID
- PAYMENT_UPSTREAM
- INTERNAL
message:
type: string
details: {}
ImageExtractRequest:
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.
externalDocs:
description: SchemaSure agent integration guide
url: https://schemasure.com/llms.txt
x-payment:
protocol: x402
version: 2
primary: true
scheme: exact
network: eip155:8453
asset: USDC
assetAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
priceUsd: 0.01
chargeModel: charge-only-on-success
alwaysPaid: true
resource: https://schemasure.com/v2/extract
resources:
- kind: text
resource: https://schemasure.com/v2/extract
priceUsd: 0.01
- kind: image
resource: https://schemasure.com/v2/extract-image
priceUsd: 0.03
x-provenance:
method: harvested
publisher: SchemaSure
source: https://schemasure.com/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)