{"uid":"cap_oc-xlYGkwfO_03fCaGpBr","slug":"one-engine-array-flatten-t2-09e49a68","name":"ONE Engine Array Flatten (T2)","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/t2?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.0007","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.0007/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2vkjGQ-BmZyKBmc04GzQa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0007","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 size, offset, and comparison array parameters.","exampleAgentPrompt":"Flatten this nested JSON array for me — it has up to 500 items — and return a flat list starting at offset 0: [[1, [2, 3]], [4, [5, [6]]]]","exampleUseCases":[{"title":"Normalizing nested API response arrays","prompt":"I got back a deeply nested array from another API and need it flattened into a single level before I process it further — here's the array: [[\"apple\", [\"banana\", \"cherry\"]], [\"date\", [\"elderberry\", [\"fig\"]]]]"},{"title":"Paginated flat slice of nested data","prompt":"Take this nested array of up to 200 items and flatten it, but only give me 50 results starting at offset 10: [[1,[2,3]],[4,[5,[6,7]]],[8,[9,[10]]]]"},{"title":"Flatten and compare arrays","prompt":"Flatten my nested array [[\"a\",[\"b\",\"c\"]],[\"d\",[\"e\",\"f\"]]] and compare the result against this reference array [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"] to see if they match."}],"resultDescription":"Returns a JSON object containing the flattened (single-level) version of the input nested array, potentially scoped by size and offset, and optionally compared against a reference array.","failureModes":["Input array exceeds 1000 items — request rejected","Malformed JSON array in 'values' field — validation error","Payment failure via x402 — 402 response, call not processed","Invalid offset or size values — unexpected truncation or error","Empty values array — may return empty result"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call array flattening utility without spinning up custom code, especially within an autonomous agent pipeline using x402 payments on Base. It supports optional pagination (offset/size) and comparison, making it more flexible than a simple flatten for data normalization tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:55.870Z","isFirstParty":false,"canonicalSlug":"one-engine-array-flatten-t2-09e49a68"}