{"uid":"cap_7gz93pb4xbm_jMv2O0Tn4","slug":"one-engine-stable-sort-t5-array-utility-api-79111263","name":"ONE Engine Stable Sort (T5) – Array Utility API","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/stable-sort/t5?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.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_o_9nr-4CpFUK-UG9Q0yos","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs a stable sort on a JSON array of up to 1000 items, optionally using a comparison array, with configurable size and offset parameters.","exampleAgentPrompt":"Can you stably sort this array of values for me: [3, 1, 4, 1, 5, 9, 2, 6] — and use [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\"] as the comparison array to break ties?","exampleUseCases":[{"title":"Sort leaderboard scores stably","prompt":"I have a list of player scores [42, 17, 99, 42, 55, 17] and I want them sorted in stable order — equal scores should keep their original relative positions. Can you sort this array for me?"},{"title":"Order product catalog by price tier","prompt":"Sort this array of product prices [29.99, 9.99, 49.99, 9.99, 19.99] stably so I can display them in ascending order without shuffling items that share the same price."},{"title":"Rank items with comparison reference","prompt":"I need to stably sort this array [\"banana\",\"apple\",\"cherry\",\"apricot\"] using [1,0,3,2] as a comparison ordering guide — please return the result with at most 4 items starting from offset 0."}],"resultDescription":"Returns a JSON object containing the stably sorted version of the input array. Equal elements maintain their original relative order. The response reflects any size and offset constraints applied to the result.","failureModes":["Array exceeds 1000-item limit — request rejected","Invalid JSON array in 'values' field — parse error","Payment failure via x402 on Base — 402 response, no computation performed","Missing required 'values' field — validation error","'other' comparison array length mismatch — undefined behavior or error"],"whenToPreferThis":"Choose this endpoint when you need a guaranteed stable sort (preserving relative order of equal elements) on a JSON array of up to 1000 items, especially inside an autonomous agent workflow that can pay micro-fees via x402 on Base. Prefer over client-side sorting when computation must be offloaded, auditable, or paid-for as a utility step in a larger pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:17.043Z","isFirstParty":false,"canonicalSlug":"one-engine-stable-sort-t5-array-utility-api-79111263"}