{"uid":"cap_BS54z5s1X5N3OOw6fNdvM","slug":"one-engine-array-rotate-bef2ad3d","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/t9?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.018","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.018/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UTuvMPP_XQTcf3vIL0W8K","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.018","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 given offset, optionally comparing against a second array.","exampleAgentPrompt":"Rotate this array [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] by an offset of 3 positions using ONE Engine's array rotate utility.","exampleUseCases":[{"title":"Circular buffer rotation for scheduling","prompt":"I have a list of 8 workers [\"Alice\",\"Bob\",\"Carol\",\"Dan\",\"Eve\",\"Frank\",\"Grace\",\"Hank\"] and I want to rotate the duty schedule by 2 positions so the next person in line is first — can you do that?"},{"title":"Sliding window data realignment","prompt":"I have a sensor readings array [10,20,30,40,50,60,70,80,90,100] and need to shift it left by 4 positions to realign it with a reference timestamp — please rotate it by offset 4."},{"title":"Round-robin playlist rotation","prompt":"Rotate my playlist queue [\"Song A\",\"Song B\",\"Song C\",\"Song D\",\"Song E\"] by 1 position so the next song becomes first, using the array rotate utility."}],"resultDescription":"Returns a JSON object containing the rotated array, with elements cyclically shifted by the specified offset. The array wraps around so elements shifted past the end reappear at the beginning.","failureModes":["Array exceeds 1000 items — request rejected","Invalid or missing 'values' field — validation error","Non-integer offset — type error","Payment not provided or insufficient — 402 Payment Required","Malformed JSON body — parse error"],"whenToPreferThis":"Choose this endpoint when you need a cheap, stateless, pay-per-call array rotation for autonomous agent workflows on Base using x402 micropayments. Ideal for lightweight utility operations where spinning up custom code is overkill and cost-per-call is a priority.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:08.524Z","isFirstParty":false,"canonicalSlug":"one-engine-array-rotate-bef2ad3d"}