{"uid":"cap_D2zr5krT_Peq9axvTxbjt","slug":"one-engine-even-sample-from-array-2e299131","name":"ONE Engine Even Sample from Array","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/even-sample/t7?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.0065","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.0065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LgXu2zZdRDmqDmGsCvWhD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0065","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns an evenly-spaced sample of elements from an array, with optional offset and size controls.","exampleAgentPrompt":"I have a list of 500 sensor readings and I need a representative even sample of 20 values from it — can you pull out evenly spaced items from the array?","exampleUseCases":[{"title":"Downsample time-series data for charting","prompt":"I have an array of 800 hourly temperature readings and I want to plot just 40 evenly spaced points — can you sample every 20th value from the list?"},{"title":"Even selection from product catalog slice","prompt":"I've got a list of 300 product IDs and I only want a uniform sample of 30 of them, evenly spread across the full list, starting from the beginning."},{"title":"Representative subset for LLM context window","prompt":"My dataset has 1000 log entries but I can only fit about 50 in my prompt — give me an evenly distributed sample of 50 entries from this array so I get good coverage."}],"resultDescription":"A JSON object containing the evenly-spaced sampled subset of the input array, selected at regular intervals according to the requested sample size and optional offset. The response may also include metadata about the sampling parameters applied.","failureModes":["Array exceeds 1000-item limit — request rejected","Missing required 'values' field — validation error","Non-integer size or offset values — schema validation failure","Empty array input — may return empty result or error","Payment failure via x402 — 402 response before processing"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call utility to downsample or evenly subsample a JSON array without spinning up custom code. Ideal for agents processing large datasets that need to reduce to a representative subset, prepare data for LLM context windows, or thin out time-series data for visualization. Prefer it over general-purpose compute when cost per call matters and the array fits within 1000 items.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:57.394Z","isFirstParty":false,"canonicalSlug":"one-engine-even-sample-from-array-ecc97402"}