{"uid":"cap_IZIV9SiOq8HS9N6yDF6Sj","slug":"delx-array-compact-401029cd","name":"Delx Array Compact","description":"Drop null/empty values from a list. Call when you clean agent arrays before serialization. Returns compacted items, count, removed for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/arr-compact","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"count":2,"items":[1,2],"schema":"delx/util-arr-compact/v1","removed":4}},"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_g1-jTNqnRgloHafDT8mvQ","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":"Removes null and empty values from an input array and returns the compacted list along with counts of remaining and removed items.","exampleAgentPrompt":"Clean up this array by removing all null and empty values before I serialize it: [\"apple\", null, \"\", \"banana\", null, \"cherry\"].","exampleUseCases":[{"title":"Pre-serialization payload cleanup","prompt":"Before I send this data to the API, strip out all the nulls and empty entries from this array: [\"user@example.com\", null, \"\", \"admin@example.com\", null]."},{"title":"Agent pipeline array sanitization","prompt":"My agent just collected a list of tags but some came back as null or empty — can you compact this array and tell me how many got removed? The list is [\"ai\", null, \"automation\", \"\", \"workflow\", null]."},{"title":"Form response cleaning","prompt":"I have survey responses in an array with a bunch of blank and null answers — filter those out and give me just the valid entries along with how many were dropped."}],"resultDescription":"Returns a JSON object containing: the compacted array with all null and empty values removed, the count of remaining items, and the count of removed items.","failureModes":["Missing or malformed 'items' field returns an error","Non-array input for items field may cause a validation error","Payment failure via x402 protocol blocks processing","Empty input array returns an empty compacted array with zero removed"],"whenToPreferThis":"Use this endpoint when you need a lightweight, stateless, zero-retention way to strip null and empty values from an array before serialization or downstream processing — especially in agent pipelines where clean JSON is required. Prefer this over writing inline filtering logic when you want a consistent, cost-predictable microservice call at $0.001 USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:50:08.473Z","isFirstParty":false}