Compose a fixed SVG bar chart
Turn 1–24 supplied labeled nonnegative integer values and an explicit domain into an inert accessible horizontal bar-chart SVG, plain-text alternative and exact geometry.
structured · Operation ID: svg-bar-chart-compose
Choose this operation when
- Already-computed nonnegative integer rows with a caller-selected zero-based domain
Outside this profile
- Aggregating data, inferring domains, negative/fractional values, log scales, stacked bars or time axes
- Rendering, printing, writing files, uploading, publishing, or changing remote state
- Supplying custom SVG, HTML, CSS, fonts, images, links, scripts or external resources
- Guaranteeing font appearance, printer alignment, source authenticity or accessibility compliance
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": {
"idPrefix": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"description": "1–80 Unicode scalars; no controls or XML-disallowed characters"
},
"domainMax": {
"type": "integer",
"minimum": 1,
"maximum": 1000000000
},
"rows": {
"minItems": 1,
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 16,
"pattern": "^[\\x20-\\x7e]+$"
},
"value": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000
}
},
"required": [
"label",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"idPrefix",
"title",
"domainMax",
"rows"
],
"additionalProperties": false
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "svg-bar-chart-compose",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"svg": {
"type": "string"
},
"textAlternative": {
"type": "string"
},
"bars": {
"minItems": 1,
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"inputIndex": {
"type": "integer",
"minimum": 0,
"maximum": 23
},
"x": {
"type": "number",
"const": 180
},
"y": {
"type": "integer",
"minimum": 32,
"maximum": 768
},
"width": {
"type": "integer",
"minimum": 0,
"maximum": 400
},
"height": {
"type": "number",
"const": 24
}
},
"required": [
"inputIndex",
"x",
"y",
"width",
"height"
],
"additionalProperties": false
}
}
},
"required": [
"svg",
"textAlternative",
"bars"
],
"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
{
"idPrefix": "sales",
"title": "Units",
"domainMax": 10,
"rows": [
{
"label": "A",
"value": 5
},
{
"label": "B",
"value": 10
}
]
}
Example response
{
"operation": "svg-bar-chart-compose",
"version": "0.29.0",
"result": {
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" width=\"720\" height=\"108\" viewBox=\"0 0 720 108\" role=\"img\" aria-labelledby=\"sales-title sales-desc\"><title id=\"sales-title\">Units</title><desc id=\"sales-desc\">Domain 0 to 10. A: 5; B: 10.</desc><rect width=\"720\" height=\"108\" fill=\"#fff\"/><g fill=\"#000\" font-family=\"monospace\" font-size=\"12\"><text x=\"16\" y=\"20\" textLength=\"36\" lengthAdjust=\"spacingAndGlyphs\">Units</text><text x=\"16\" y=\"50\">A</text><text x=\"700\" y=\"50\" text-anchor=\"end\">5</text><text x=\"16\" y=\"82\">B</text><text x=\"700\" y=\"82\" text-anchor=\"end\">10</text></g><g fill=\"#2457a7\"><rect x=\"180\" y=\"32\" width=\"200\" height=\"24\"/><rect x=\"180\" y=\"64\" width=\"400\" height=\"24\"/></g></svg>\n",
"textAlternative": "Units. Domain 0 to 10. A: 5; B: 10.",
"bars": [
{
"inputIndex": 0,
"x": 180,
"y": 32,
"width": 200,
"height": 24
},
{
"inputIndex": 1,
"x": 180,
"y": 64,
"width": 400,
"height": 24
}
]
},
"provenance": {
"inputSha256": "973f898ca2fb35ca2355c298cede3e4fe15e672477d8181c49a61671c6c220b6",
"outputSha256": "a8462700e0da6472b73dddabd13ff57e87822365aa8209868de4fe65ae424fce",
"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": 400000,
"jsonNodes": 12000,
"depth": 20,
"profile": "svg-nonnegative-horizontal-bars-v1",
"rows": 24,
"labelAsciiCharacters": 16,
"titleScalars": 80,
"idPrefixCharacters": 32,
"maximumValue": 1000000000,
"widthPixels": 720,
"maximumProjectedResultBytes": 30560
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.005",
"sixDecimalTokenBaseUnits": "5000",
"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/svg-bar-chart-compose",
"mpp": "/v1/mpp/svg-bar-chart-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.