{"uid":"cap_cGHF3kI6pmrNafWGLGjJ9","slug":"one-engine-array-flatten-a99f1af1","name":"ONE Engine Array Flatten","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/array/flatten/t7?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["values"],"properties":{"size":{"type":"integer"},"other":{"type":"array","description":"Optional comparison array"},"offset":{"type":"integer"},"values":{"type":"array","description":"JSON array with at most 1000 items"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0065","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.0065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gCOAxmITpyuJMdpO_QC33","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0065","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Flattens a nested JSON array into a single-level array, with optional offset, size limit, and comparison array parameters.","exampleAgentPrompt":"Flatten this nested array for me: [[1, 2], [3, [4, 5]], 6] — I want it as a single flat list, starting from offset 0 and limiting to 50 items.","exampleUseCases":[{"title":"Normalizing nested API response data","prompt":"I got back a deeply nested array from another API — [[\"apple\", \"banana\"], [\"cherry\", [\"date\", \"elderberry\"]]] — can you flatten it into a single list so I can process it uniformly?"},{"title":"Paginating through a flat view of nested data","prompt":"I have this nested array with up to 200 items and I want to flatten it and only return items starting at offset 10, giving me the next 20 items in the flat result."},{"title":"Comparing flat arrays after normalization","prompt":"Flatten my nested input array [[1,2],[3,[4,5]]] and compare it against this other array [1,2,3,4,5] to see if they match after flattening."}],"resultDescription":"Returns a JSON object containing the flattened (single-level) version of the input nested array, potentially filtered by offset and size, and optionally compared against another array.","failureModes":["Input array exceeds 1000 items — request rejected or truncated","Missing required 'values' field — validation error returned","Malformed JSON in input — parse error","Payment failure via x402 — 402 response, call not processed","Offset exceeds array length — empty or partial result returned"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call array flattening operation without standing up your own compute, especially inside an autonomous agent workflow on Base using x402 micropayments. It is ideal for one-off or infrequent array normalization tasks where the input is under 1000 items.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:37.552Z","isFirstParty":false,"canonicalSlug":"one-engine-array-flatten-2651dc85"}