{"uid":"cap_caVzU0c6kBX36daugqa4R","slug":"one-engine-array-flatten-2959f508","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/t6?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.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7TKOlBQpSCQIKGI0HPMUu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","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 array and offset/size controls.","exampleAgentPrompt":"Flatten this nested JSON array for me — it has up to 500 items with multiple levels of nesting: [[1, [2, 3]], [4, [5, [6]]]]","exampleUseCases":[{"title":"Normalize nested API response arrays","prompt":"I got a deeply nested array back from an API response and need to flatten it into a single list before I can process it further — here's the array: [[\"a\",[\"b\",\"c\"]],[\"d\",[\"e\",[\"f\"]]]]"},{"title":"Compare flattened arrays for data pipeline","prompt":"Flatten this nested array [[1,[2,3]],[4,[5,6]]] and compare it against this reference array [1,2,3,4,5,6] so I can check if the values match after normalization."},{"title":"Paginate through large flattened dataset","prompt":"I have a big nested array with about 800 items across multiple levels of nesting — flatten it but only return 100 items starting at offset 200 so I can paginate through the results."}],"resultDescription":"Returns a JSON object containing the flattened (single-level) version of the input array, with optional filtering applied via offset and size parameters. The response may also include comparison results if an optional comparison array was provided.","failureModes":["Input array exceeds 1000 items — request rejected","Malformed JSON array in 'values' field — parsing error returned","Payment not included or insufficient — 402 Payment Required response","Size or offset values out of valid integer range — validation error","Empty 'values' field — missing required parameter error"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-call array flattening utility without provisioning your own compute, especially within an autonomous agent workflow on Base using x402 micropayments. Prefer this over custom code when you need a reliable, low-cost single API call for one-off or infrequent array normalization tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:07.277Z","isFirstParty":false,"canonicalSlug":"one-engine-array-flatten-2651dc85"}