{"uid":"cap_VBfxwKDlGk2Wqp1Xciix8","slug":"one-engine-array-rotate-5285e1be","name":"ONE Engine Array Rotate","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/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_jLWUsj8KPyN5bMRMNeMkB","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":"Rotates the elements of a JSON array by a specified offset, optionally comparing with a second array.","exampleAgentPrompt":"Rotate this array [1, 2, 3, 4, 5] by 2 positions to the right.","exampleUseCases":[{"title":"Circular buffer rotation for agent pipelines","prompt":"I have a queue represented as [10, 20, 30, 40, 50] and I need to rotate it by 3 positions — can you do that for me?"},{"title":"Comparing rotated arrays for data alignment","prompt":"Take the array ['a','b','c','d','e'] and rotate it by 1, then compare it against ['b','c','d','e','a'] to check if they match."},{"title":"Sliding window offset for time-series data","prompt":"I have a list of 7 daily values [100,200,150,300,250,400,350] and I want to shift it cyclically by 4 positions so the week wraps around correctly."}],"resultDescription":"Returns a JSON object containing the rotated array after applying the specified offset. If a comparison array is provided, the response may include alignment or match information between the rotated result and the comparison array.","failureModes":["Array exceeds 1000-item limit — request rejected","Missing required 'values' field — validation error","Non-integer offset provided — schema validation failure","Payment failure via x402 — 402 response, call not executed","Malformed JSON body — 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need a cheap, fast, pay-per-call utility to perform array rotation without spinning up custom compute. Ideal for autonomous agents running on Base via x402 that need lightweight array manipulation as a primitive step in a larger workflow, especially when you want deterministic circular shifting rather than sorting or filtering.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:50.549Z","isFirstParty":false,"canonicalSlug":"one-engine-array-rotate-bef2ad3d"}