{"uid":"cap_jV9Et_zotfeX58Icnr8c-","slug":"one-engine-array-flatten-t1-550712d2","name":"ONE Engine Array Flatten (T1)","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/t1?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.0005","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.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2B1JkGfZxNwmMVebpGmd4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","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 comparison against another array.","exampleAgentPrompt":"Flatten this nested array for me: [[1, 2], [3, [4, 5]], 6] — I need it as a single flat list.","exampleUseCases":[{"title":"Normalize API response arrays","prompt":"I got back a deeply nested array from another API — [[\"a\",\"b\"],[\"c\",[\"d\",\"e\"]]] — can you flatten it into a single-level list so I can loop through the items?"},{"title":"Prepare data for tabular processing","prompt":"I have a JSON array with up to 500 items nested several levels deep and I need it completely flat before I insert it into a table. Can you flatten [[1,[2,3]],[4,[5,[6,7]]]] for me?"},{"title":"Compare flattened output to reference list","prompt":"Flatten my nested array [[\"foo\",[\"bar\",\"baz\"]],\"qux\"] and compare it against my reference list [\"foo\",\"bar\",\"baz\",\"qux\"] so I can see if they match."}],"resultDescription":"Returns a JSON object containing the flattened (single-level) version of the input array, potentially with comparison results if an optional 'other' array was supplied.","failureModes":["Input array exceeds 1000 items — request rejected","Malformed or non-array 'values' field — validation error","Payment not included or insufficient — 402 Payment Required response","Network timeout on the Cloudflare Worker edge","Invalid 'offset' or 'size' parameter types causing schema rejection"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call array flattening operation without spinning up a local compute environment — especially in autonomous agent pipelines on Base using x402 micropayments where you want predictable, low-cost ($0.0005 USDC) data normalization at the edge.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:42:48.897Z","isFirstParty":false,"canonicalSlug":"one-engine-array-flatten-t1-550712d2"}