Typed HTTP structured-field composer
Compose separate exact RFC 8941-compatible structured field values from explicit typed Items, Lists and Dictionaries; preserve decimal types without floating-point rounding.
structured · Operation ID: http-structured-fields-compose
Choose this operation when
- Composing caller-declared structured field name/value pairs for offline protocol fixtures
- Preserving ordered dictionaries and parameters with explicit string/token/bytes/integer/decimal/boolean types
- Rejecting decimal rounding, injection and duplicate keys before handoff
Outside this profile
- Parsing existing fields, combining repeated lines or normalizing arbitrary headers
- Full RFC 9651 Date and Display String types; this explicit RFC 8941 vocabulary profile excludes them
- HTTP Message Signatures, signing, digest verification, authentication, cookies, header policy or application field semantics
- Raw HTTP header blocks, requests or transmission
- Network requests, writing files, live configuration changes, authentication, publishing or deployment
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": {
"fields": {
"maxItems": 16,
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
}
},
"required": [
"fields"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"kind": {
"type": "string",
"const": "item"
},
"value": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"name",
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"kind": {
"type": "string",
"const": "list"
},
"value": {
"maxItems": 128,
"type": "array",
"items": {
"$ref": "#/$defs/__schema5"
}
}
},
"required": [
"name",
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"kind": {
"type": "string",
"const": "dictionary"
},
"value": {
"maxItems": 128,
"type": "array",
"items": {
"$ref": "#/$defs/__schema6"
}
}
},
"required": [
"name",
"kind",
"value"
],
"additionalProperties": false
}
]
},
"__schema1": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "item"
},
"value": {
"$ref": "#/$defs/__schema2"
},
"parameters": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"kind",
"value",
"parameters"
],
"additionalProperties": false
},
"__schema2": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "integer"
},
"value": {
"type": "string",
"maxLength": 16
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "decimal"
},
"value": {
"type": "string",
"maxLength": 17
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "string"
},
"value": {
"type": "string",
"maxLength": 1024
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "token"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "bytes"
},
"base64": {
"type": "string",
"maxLength": 2732
}
},
"required": [
"type",
"base64"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"value": {
"type": "boolean"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
}
]
},
"__schema3": {
"maxItems": 16,
"type": "array",
"items": {
"$ref": "#/$defs/__schema4"
}
},
"__schema4": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"value": {
"$ref": "#/$defs/__schema2"
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
},
"__schema5": {
"anyOf": [
{
"$ref": "#/$defs/__schema1"
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "inner-list"
},
"items": {
"maxItems": 32,
"type": "array",
"items": {
"$ref": "#/$defs/__schema1"
}
},
"parameters": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"kind",
"items",
"parameters"
],
"additionalProperties": false
}
]
},
"__schema6": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"value": {
"$ref": "#/$defs/__schema5"
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
}
}
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "http-structured-fields-compose",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "http-sf-rfc8941-compose-v1"
},
"fields": {
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"kind": {
"type": "string",
"enum": [
"item",
"list",
"dictionary"
]
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 8192
},
{
"type": "null"
}
]
},
"byteLength": {
"type": "integer",
"minimum": 0,
"maximum": 8192
},
"sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
},
"omitted": {
"type": "boolean"
}
},
"required": [
"name",
"kind",
"value",
"byteLength",
"sha256",
"omitted"
],
"additionalProperties": false
}
},
"totalValueBytes": {
"type": "integer",
"minimum": 0,
"maximum": 16384
}
},
"required": [
"profile",
"fields",
"totalValueBytes"
],
"additionalProperties": false
},
"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
{
"fields": [
{
"name": "example-field",
"kind": "dictionary",
"value": [
{
"key": "demo",
"value": {
"kind": "inner-list",
"items": [
{
"kind": "item",
"value": {
"type": "string",
"value": "@method"
},
"parameters": []
},
{
"kind": "item",
"value": {
"type": "string",
"value": "@path"
},
"parameters": []
}
],
"parameters": [
{
"key": "created",
"value": {
"type": "integer",
"value": "1700000000"
}
},
{
"key": "keyid",
"value": {
"type": "string",
"value": "test-key"
}
}
]
}
}
]
}
]
}
Example response
{
"operation": "http-structured-fields-compose",
"version": "0.29.0",
"result": {
"profile": "http-sf-rfc8941-compose-v1",
"fields": [
{
"name": "example-field",
"kind": "dictionary",
"value": "demo=(\"@method\" \"@path\");created=1700000000;keyid=\"test-key\"",
"byteLength": 60,
"sha256": "9549594186c7d71f2acc27b9af7465a6e8702825b92cc5d7a196a689a83f256a",
"omitted": false
}
],
"totalValueBytes": 60
},
"provenance": {
"inputSha256": "cb932c2bbf36d20dfa385ebc42387e41d8319f351e288e39c4a77589a100fd87",
"outputSha256": "6dbcf72ffb8b18b3d6fdc44a3a79541f0f2b2134575242028789cb33f8823e8f",
"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": {
"inputBytes": 100000,
"outputBytes": 300000,
"jsonNodes": 12000,
"depth": 20,
"fields": 16,
"fieldValueBytes": 8192,
"totalValueBytes": 16384,
"topLevelMembers": 128,
"innerListItems": 32,
"parameters": 16,
"bareItems": 512,
"keyAsciiBytes": 64,
"tokenBytes": 256,
"stringBytes": 1024,
"decodedByteValueBytes": 2048,
"profile": "http-sf-rfc8941-compose-v1"
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.003",
"sixDecimalTokenBaseUnits": "3000",
"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. MPP uses Tempo charge. 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/http-structured-fields-compose",
"mpp": "/v1/mpp/http-structured-fields-compose"
}
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.