Checked JSON Artifact Bundle
Repair one JSON document, require a valid caller-schema result, serialize and SHA-256 hash it before one x402 settlement. Fixed four-step local profile; no partial result, RFC 8785 or guaranteed delivery.
document-assurance · Operation ID: checked-json-artifact
Choose this operation when
- The caller needs all four successful local steps as one x402-only fixed job
- Withhold partial results and stop before new settlement if repair or schema acceptance fails
Outside this profile
- Arbitrary workflows, operation lists, bindings, external requests, MPP, or per-step pricing
- Only repair, only validation, or a job that does not need an artifact digest
- Full JSON Schema, RFC 8785, semantic truth, authenticity or guaranteed delivery
Exact release references
Static JSON contract · Markdown reference · Fixed example response
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"profile": {
"const": "checked-json-artifact-v1"
},
"steps": {
"type": "array",
"prefixItems": [
{
"type": "object",
"properties": {
"id": {
"const": "repair"
},
"operation": {
"const": "json-repair"
},
"input": {
"type": "object",
"properties": {
"profile": {
"const": "conservative-json-repair-v1"
},
"items": {
"type": "array",
"prefixItems": [
{
"type": "object",
"properties": {
"id": {
"const": "document"
},
"text": {
"type": "string",
"maxLength": 8000
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
],
"items": false,
"minItems": 1
}
},
"required": [
"profile",
"items"
],
"additionalProperties": false
}
},
"required": [
"id",
"operation",
"input"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"const": "validate"
},
"operation": {
"const": "json-schema-check"
},
"input": {
"type": "object",
"properties": {
"schema": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"schema"
],
"additionalProperties": false
},
"bindings": {
"const": [
{
"target": "/value",
"from": {
"step": "repair",
"pointer": "/results/0/value"
}
}
]
}
},
"required": [
"id",
"operation",
"input",
"bindings"
],
"additionalProperties": false
},
{
"const": {
"id": "serialize",
"operation": "json-canonicalize",
"input": {},
"bindings": [
{
"target": "/value",
"from": {
"step": "repair",
"pointer": "/results/0/value"
}
}
]
}
},
{
"const": {
"id": "digest",
"operation": "content-digest",
"input": {
"algorithm": "SHA-256"
},
"bindings": [
{
"target": "/text",
"from": {
"step": "serialize",
"pointer": "/canonical"
}
}
]
}
}
],
"items": false,
"minItems": 4
}
},
"required": [
"profile",
"steps"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "checked-json-artifact",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"profile": {
"const": "checked-json-artifact-v1"
},
"status": {
"const": "complete"
},
"stepCount": {
"const": 4
},
"steps": {
"type": "array",
"prefixItems": [
{
"type": "object",
"properties": {
"id": {
"const": "repair"
},
"operation": {
"const": "json-repair"
},
"result": {
"type": "object",
"properties": {
"profile": {
"const": "conservative-json-repair-v1"
},
"offsetUnit": {
"const": "utf16-code-units"
},
"itemCount": {
"const": 1
},
"successCount": {
"const": 1
},
"rejectedCount": {
"const": 0
},
"results": {
"type": "array",
"prefixItems": [
{
"type": "object",
"properties": {
"id": {
"const": "document"
},
"originalText": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"repaired",
"unchanged"
]
},
"originalSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"originalWasValidJson": {
"type": "boolean"
},
"repairedText": {
"type": "string"
},
"repairedSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"value": {
"$ref": "#/properties/result/$defs/__schema0"
},
"edits": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"remove-bom",
"remove-fence",
"replace-comment",
"remove-trailing-comma",
"quote-key",
"convert-single-quoted-string",
"convert-python-literal"
]
},
"start": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"before": {
"type": "string"
},
"after": {
"type": "string"
}
},
"required": [
"kind",
"start",
"end",
"before",
"after"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"originalText",
"status",
"originalSha256",
"originalWasValidJson",
"repairedText",
"repairedSha256",
"value",
"edits"
],
"additionalProperties": false
}
],
"items": false,
"minItems": 1
}
},
"required": [
"profile",
"offsetUnit",
"itemCount",
"successCount",
"rejectedCount",
"results"
],
"additionalProperties": false
}
},
"required": [
"id",
"operation",
"result"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"const": "validate"
},
"operation": {
"const": "json-schema-check"
},
"result": {
"type": "object",
"properties": {
"valid": {
"const": true
},
"errors": {
"maxItems": 0,
"type": "array",
"items": {
"not": {}
}
},
"dialect": {
"const": "safe-json-schema-subset-v1"
}
},
"required": [
"valid",
"errors",
"dialect"
],
"additionalProperties": false
}
},
"required": [
"id",
"operation",
"result"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"const": "serialize"
},
"operation": {
"const": "json-canonicalize"
},
"result": {
"type": "object",
"properties": {
"canonical": {
"type": "string",
"maxLength": 100000
},
"bytesUtf8": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"canonical",
"bytesUtf8"
],
"additionalProperties": false
}
},
"required": [
"id",
"operation",
"result"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"const": "digest"
},
"operation": {
"const": "content-digest"
},
"result": {
"type": "object",
"properties": {
"algorithm": {
"const": "SHA-256"
},
"hex": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"base64": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{43}=$"
},
"byteLength": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"algorithm",
"hex",
"base64",
"byteLength"
],
"additionalProperties": false
}
},
"required": [
"id",
"operation",
"result"
],
"additionalProperties": false
}
],
"items": false,
"minItems": 4
},
"externalRequests": {
"const": 0
}
},
"required": [
"profile",
"status",
"stepCount",
"steps",
"externalRequests"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/properties/result/$defs/__schema0"
}
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/properties/result/$defs/__schema0"
}
}
]
}
}
},
"provenance": {
"type": "object",
"required": [
"inputSha256",
"outputSha256",
"deterministic",
"externalRequests"
],
"properties": {
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"outputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"deterministic": {
"const": true
},
"externalRequests": {
"const": 0
}
}
}
},
"additionalProperties": false
}
Fixed example
One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.
Example input
{
"profile": "checked-json-artifact-v1",
"steps": [
{
"id": "repair",
"operation": "json-repair",
"input": {
"profile": "conservative-json-repair-v1",
"items": [
{
"id": "document",
"text": "True"
}
]
}
},
{
"id": "validate",
"operation": "json-schema-check",
"input": {
"schema": {
"type": "boolean"
}
},
"bindings": [
{
"target": "/value",
"from": {
"step": "repair",
"pointer": "/results/0/value"
}
}
]
},
{
"id": "serialize",
"operation": "json-canonicalize",
"input": {},
"bindings": [
{
"target": "/value",
"from": {
"step": "repair",
"pointer": "/results/0/value"
}
}
]
},
{
"id": "digest",
"operation": "content-digest",
"input": {
"algorithm": "SHA-256"
},
"bindings": [
{
"target": "/text",
"from": {
"step": "serialize",
"pointer": "/canonical"
}
}
]
}
]
}
Example response
{
"operation": "checked-json-artifact",
"version": "0.29.0",
"result": {
"profile": "checked-json-artifact-v1",
"status": "complete",
"stepCount": 4,
"steps": [
{
"id": "repair",
"operation": "json-repair",
"result": {
"profile": "conservative-json-repair-v1",
"offsetUnit": "utf16-code-units",
"itemCount": 1,
"successCount": 1,
"rejectedCount": 0,
"results": [
{
"id": "document",
"originalText": "True",
"status": "repaired",
"originalSha256": "3cbc87c7681f34db4617feaa2c8801931bc5e42d8d0f560e756dd4cd92885f18",
"originalWasValidJson": false,
"repairedText": "true",
"repairedSha256": "b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b",
"value": true,
"edits": [
{
"kind": "convert-python-literal",
"start": 0,
"end": 4,
"before": "True",
"after": "true"
}
]
}
]
}
},
{
"id": "validate",
"operation": "json-schema-check",
"result": {
"valid": true,
"errors": [],
"dialect": "safe-json-schema-subset-v1"
}
},
{
"id": "serialize",
"operation": "json-canonicalize",
"result": {
"canonical": "true",
"bytesUtf8": 4
}
},
{
"id": "digest",
"operation": "content-digest",
"result": {
"algorithm": "SHA-256",
"hex": "b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b",
"base64": "tb6kG2xiP3wJ8b8k3K5Y66s8DN2QrZZrxDpFtEhn4Ss=",
"byteLength": 4
}
}
],
"externalRequests": 0
},
"provenance": {
"inputSha256": "978b1678c043303983abb687f36066ac3901dd8cc25faad57c5b549bdd20d606",
"outputSha256": "0ce678cb0e4d06c619e9da513aea8a2e9c162bdf8c513bff1ebc48b4b1b9735a",
"deterministic": true,
"externalRequests": 0
}
}
Bounds and precision
JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.
{
"global": {
"requestBytes": 131072,
"responseBytes": 524288,
"jsonDepth": 32,
"jsonNodes": 20000,
"requestsPerMinute": 60,
"paidAttemptsPerMinute": 20,
"idempotencyHours": 24
},
"operation": {
"steps": 4,
"sourceItems": 1,
"bindings": 3,
"inputBytes": 32768,
"sourceCodeUnits": 8000,
"sourceBytesUtf8": 16000,
"schemaBytes": 8192,
"schemaNodes": 64,
"schemaDepth": 8,
"combinatorMembers": 4,
"enumConstBytes": 8192,
"valueNodes": 2000,
"valueDepth": 16,
"valueCollectionEntries": 256,
"repairEdits": 100,
"resolvedInputBytes": 32768,
"resolvedInputNodes": 4000,
"resolvedInputDepth": 20,
"intermediateOutputBytes": 65536,
"aggregateBytes": 196608,
"aggregateNodes": 16000,
"outputBytes": 131072,
"jsonDepth": 24,
"jsonNodes": 16000,
"profile": "checked-json-artifact-v1",
"networkAccess": "none-for-local-transformations",
"schemaDialect": "safe-json-schema-subset-v1",
"serializationProfile": "sorted-key-javascript-json-not-rfc8785",
"paymentProtocol": "x402-only",
"priceStatus": "proposed-unverified",
"delivery": "not-guaranteed"
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.016",
"sixDecimalTokenBaseUnits": "16000",
"subscription": false,
"includesPayerWalletOrNetworkFees": false,
"liveQuoteVerified": false,
"condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}
Protocol definitions: x402. MPP is unsupported for this operation. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.
API path templates, not endpoints on this documentation host
{
"x402": "/v1/x402/checked-json-artifact"
}
Required headers
{
"Content-Type": "application/json",
"Idempotency-Key": "random 16–128 character operation identifier"
}
Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.
Execution profile and provider conditions
{
"deterministic": true,
"externalRequests": 0,
"maxExternalRequests": 0,
"resultSnapshotPersisted": false,
"fixedExampleIsIllustrativeSnapshot": false,
"requiresPayment": true,
"supportsMcpExecution": false
}
Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.
Failure handling
- HTTP 400: Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch Correct the request before payment
- HTTP 402: Payment challenge or rejected payment Use official protocol SDK; inspect payment outcome before another payment
- HTTP 409: Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay
- HTTP 413: Input or generated output too large Reduce input; no payment attempted for validation failure
- HTTP 415: Unsupported media type or compression Send uncompressed application/json
- HTTP 422: Schema or service-specific semantic validation failure Correct input using returned error code; no payment attempted
- HTTP 429: Request/payment-attempt rate exceeded Wait for rate limit window; preserve existing payment identity
- HTTP 503: Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation
Declared requirements
Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.