{"uid":"cap_NS00AqbUNJZsSRiWYNOCm","slug":"delx-commerce-json-array-length-check-b181aacd","name":"Delx Commerce — JSON Array Length Check","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/json-array-length-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Fields supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."},"object":{"type":"object","description":"Object supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true},"maximum":{"type":"integer","description":"Maximum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."},"minimum":{"type":"integer","description":"Minimum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"passed":true,"invalid_fields":[]},"schema":"delx/util-json-array-length-check/v1","status":"pass","evidence":{"retained":false,"input_sha256":"95a21205d9c6d659623a8ea762303c79e2d75f8c4ff1455041af6261652db58d","external_calls":0},"operation":"data_batch:json_array_length_check"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0a2eNyJ9VKDwEU8N7QzOp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates that specified array fields within a JSON object have lengths falling within a given minimum and maximum range, returning a pass/fail result with details on any invalid fields.","exampleAgentPrompt":"Check whether the arrays in this JSON object all have between 2 and 10 elements — specifically the fields 'tags' and 'items': {\"tags\":[\"a\",\"b\"],\"items\":[1,2,3,4,5,6,7,8,9,10,11]}.","exampleUseCases":[{"title":"API payload pre-validation for agent pipelines","prompt":"Before sending this batch payload to the downstream service, check that the 'recipients' and 'attachments' array fields in this JSON each have between 1 and 50 elements: {\"recipients\":[\"alice@example.com\",\"bob@example.com\"],\"attachments\":[\"file1.pdf\"]}."},{"title":"Data quality gate for ingested records","prompt":"I'm ingesting user records and need to confirm the 'tags' and 'roles' arrays in each record have at least 1 and no more than 5 elements — can you run this check on this object: {\"tags\":[\"vip\",\"active\",\"beta\"],\"roles\":[\"admin\",\"user\",\"editor\",\"moderator\",\"reviewer\",\"guest\"]}?"},{"title":"Form submission array constraint enforcement","prompt":"A user submitted this form response and I need to validate that their 'selected_options' array has between 2 and 4 choices: {\"selected_options\":[\"option_a\",\"option_b\",\"option_c\",\"option_d\",\"option_e\"]}. Tell me if it passes or which fields fail."}],"resultDescription":"Returns a JSON object indicating whether all specified array fields passed the length check (pass/fail status, boolean 'passed'), a list of any fields that violated the constraints ('invalid_fields'), the operation name, schema version, and evidence metadata including a SHA-256 hash of the input and confirmation that no data was retained and no external calls were made.","failureModes":["Array field named in 'fields' not found in 'object' — may be silently skipped or flagged as invalid","Input object exceeds 128 properties limit — request rejected","Fields array exceeds 256 items limit — request rejected","Missing or malformed 'object' body — validation cannot proceed","Non-integer minimum or maximum values — schema validation error","Payment not included or insufficient USDC — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call, no-signup array length validation check on JSON objects — especially useful in agentic workflows where you want verifiable, tamper-evident results (SHA-256 input hash) without retaining data. Prefer it over custom code when you need on-demand validation with a cryptographic audit trail and don't want to maintain validation infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:43.233Z","isFirstParty":false,"canonicalSlug":"delx-commerce-json-array-length-check-b181aacd"}