{"id":"micro-batch","title":"Run up to 20 micro checks under one payment ($0.02)","description":"Bundles up to 20 calls to any pure micro check (catalog entries that are neither stateful nor network-reading, e.g. checksum, patch-anchor, allocate, business-deadline) into one x402 settlement, so a full batch costs $0.001 per check. Every call is validated before payment; one invalid call rejects the batch with its index. The request is capped at 128kb and a CPU weight of 40 (an ordinary check weighs 1; dst-check 5, time-bucket-check 5, float-stability 2, font-convert 20, font-glyph-svg 3, font-face-css 3). Results come back in order, each exactly as the single-call endpoint returns it.","roi":"A full batch of 20 checks costs $0.02, a fifth of the single-call price per check.","audience":"agent-infra","channels":["x402","mcp"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/micro-batch","path":"/api/v1/micro-batch","contentType":"application/json"},"price":{"amount":"0.02","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["calls"],"properties":{"calls":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["tool","input"],"properties":{"tool":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Micro check id, e.g. checksum."},"input":{"type":"object","description":"That check's own request body."}}}}}},"resultSchema":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"calls":{"type":"integer"},"counts":{"type":"object","properties":{"pass":{"type":"integer"},"fail":{"type":"integer"},"unknown":{"type":"integer"},"unsupported":{"type":"integer"}}},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"tool":{"type":"string"},"response":{"type":"object","description":"Exactly what the single-call endpoint returns."}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"calls":{"type":"integer"},"counts":{"type":"object","properties":{"pass":{"type":"integer"},"fail":{"type":"integer"},"unknown":{"type":"integer"},"unsupported":{"type":"integer"}}},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"tool":{"type":"string"},"response":{"type":"object","description":"Exactly what the single-call endpoint returns."}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"calls":[{"tool":"acceptance-receipt","input":{"output":{"total":10},"tests":[{"id":"positive","kind":"number-between","path":"/total","min":0}]}},{"tool":"acceptance-receipt","input":{"output":{"total":-1},"tests":[{"id":"positive","kind":"number-between","path":"/total","min":0}]}}]},"openapiOperation":{"operationId":"micro_batch","summary":"Run up to 20 micro checks under one payment ($0.02)","description":"Bundles up to 20 calls to any pure micro check (catalog entries that are neither stateful nor network-reading, e.g. checksum, patch-anchor, allocate, business-deadline) into one x402 settlement, so a full batch costs $0.001 per check. Every call is validated before payment; one invalid call rejects the batch with its index. The request is capped at 128kb and a CPU weight of 40 (an ordinary check weighs 1; dst-check 5, time-bucket-check 5, float-stability 2, font-convert 20, font-glyph-svg 3, font-face-css 3). Results come back in order, each exactly as the single-call endpoint returns it.\n\nPrice: 0.02 USDC on Base (x402).","x-x402-price-usdc":"0.02","x-x402-amount":"20000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.02"}},"x-audience":"agent-infra","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/micro-batch","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["calls"],"properties":{"calls":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["tool","input"],"properties":{"tool":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Micro check id, e.g. checksum."},"input":{"type":"object","description":"That check's own request body."}}}}}},"example":{"calls":[{"tool":"acceptance-receipt","input":{"output":{"total":10},"tests":[{"id":"positive","kind":"number-between","path":"/total","min":0}]}},{"tool":"acceptance-receipt","input":{"output":{"total":-1},"tests":[{"id":"positive","kind":"number-between","path":"/total","min":0}]}}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"calls":{"type":"integer"},"counts":{"type":"object","properties":{"pass":{"type":"integer"},"fail":{"type":"integer"},"unknown":{"type":"integer"},"unsupported":{"type":"integer"}}},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"tool":{"type":"string"},"response":{"type":"object","description":"Exactly what the single-call endpoint returns."}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/micro-batch/","docsJson":"https://agents.writerslogic.com/docs/micro-batch.json","sample":"https://agents.writerslogic.com/api/v1/samples/micro-batch","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}