{"uid":"cap_SXXX8evAf1QoT78L6acqu","slug":"one-engine-array-rotate-top-10-offset-5d0652dc","name":"ONE Engine Array Rotate (Top-10 Offset)","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/rotate/t10?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.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AsJlA6jCdU5PE8CqruE6N","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Rotates a JSON array by a specified offset, returning the top 10 reordered elements, with optional comparison against a second array.","exampleAgentPrompt":"Rotate this array [\"a\",\"b\",\"c\",\"d\",\"e\"] by an offset of 2 and give me the top 10 results.","exampleUseCases":[{"title":"Cyclic queue rotation for scheduling","prompt":"I have a round-robin task queue [\"worker1\",\"worker2\",\"worker3\",\"worker4\"] and need to rotate it by 1 position so the next worker is up first — give me the reordered list."},{"title":"Playlist shuffle by offset","prompt":"Take my ordered playlist [\"song1\",\"song2\",\"song3\",\"song4\",\"song5\",\"song6\"] and rotate it 3 steps forward so I can start from a different point without losing the order."},{"title":"Compare rotated arrays for alignment","prompt":"I have two arrays — [10,20,30,40,50] and [30,40,50,10,20] — rotate the first one by offset 2 and compare it against the second to see if they align."}],"resultDescription":"Returns a JSON object containing the rotated array, shifted by the specified offset, limited to the top 10 (t10) elements. If a comparison array is provided, the response may include alignment or comparison data between the rotated result and the second array.","failureModes":["Array exceeds 1000 items — request rejected","Missing required 'values' field — validation error","Invalid offset type (non-integer) — schema error","Payment not provided or insufficient — 402 Payment Required","Malformed JSON body — parse error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call array rotation utility without spinning up your own compute — especially useful for AI agents that need deterministic cyclic reordering of small-to-medium lists (up to 1000 items) and want a result capped at 10 elements. Prefer it over a general-purpose code execution service when you want a simple, cheap, stateless transformation via x402 micropayment on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:22.887Z","isFirstParty":false,"canonicalSlug":"one-engine-array-rotate-top-10-offset-5d0652dc"}