{"uid":"cap_sRbieyndobAIc39W-6yeu","slug":"delx-commerce-flatten-array-utility-flatten1-73f1850e","name":"Delx Commerce — Flatten Array Utility (flatten1)","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/flatten1?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"count":4,"items":[1,2,3,4],"schema":"delx/util-flatten1/v1"}},"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_5KILhM9d24_AJM39yD5QD","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":"Flattens a nested array structure by one level and returns the resulting flat list with a count.","exampleAgentPrompt":"Can you flatten this nested array by one level: [[1, 2], [3, [4, 5]], 6]? I just need one level of depth removed, not fully recursive.","exampleUseCases":[{"title":"Normalize API response arrays","prompt":"I'm getting back a nested array from another API that looks like [[\"a\",\"b\"],[\"c\",\"d\"]] and I need it flattened one level into a single list before I process it further — can you do that?"},{"title":"Pre-process list before deduplication","prompt":"I have this list of grouped items: [[1,2,3],[4,5],[6]] that I need to flatten one level so I can then deduplicate them — can you flatten it for me?"},{"title":"Unwrap paginated batch results","prompt":"I collected results across multiple batches and they're stored as [[\"result1\",\"result2\"],[\"result3\"]] — flatten that one level so I can treat them as a single list."}],"resultDescription":"Returns a JSON object containing the flattened array under 'items', the count of resulting elements under 'count', and a schema identifier string 'delx/util-flatten1/v1'.","failureModes":["Missing or empty 'items' field returns an error","Non-array value passed as items causes a validation error","Payment failure via x402 prevents execution","Malformed JSON body results in a parse error"],"whenToPreferThis":"Choose this endpoint when you need a simple, pay-per-call, no-signup utility to flatten one level of a nested array, especially in agent pipelines using x402 micropayments on Base or Solana. Ideal for lightweight data normalization steps where spinning up a local computation is overkill or unavailable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:09.189Z","isFirstParty":false,"canonicalSlug":"delx-commerce-flatten-array-utility-flatten1-73f1850e"}