{"uid":"cap_RmsyFfZ9U5kOe6mT1Ux0Z","slug":"solgiery-random-ordered-sample-00d94204","name":"Solgiery Random – Ordered Sample","description":"Select count items as an ordered sample. replace defaults to false: each original index may occur once and count must not exceed the input length. With replace=true, draws are independent and indices may repeat. Uses the server OS CSPRNG. Returns consumed bytes for reproducible calculation, not proof of their origin. Price: 0.007 USDC per request, including the bounded batch.","url":"https://api.solgiery.com/v1/random/sample","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"count":{"type":"integer","maximum":1000,"minimum":1},"items":{"type":"array","items":{},"maxItems":1000,"minItems":1},"replace":{"type":"boolean","default":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.007","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.007/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.007","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.007","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jIufKw3U-JJzvPpcAlKNh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.007","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Selects a specified count of items from an input array as an ordered sample, with or without replacement, using a cryptographically secure server-side RNG.","exampleAgentPrompt":"Pick 5 random items from this list — [\"apple\", \"banana\", \"cherry\", \"date\", \"elderberry\", \"fig\", \"grape\"] — without replacement, using cryptographic randomness.","exampleUseCases":[{"title":"Random contest winner selection","prompt":"I have a list of 200 contest entrant names and I need to pick 10 winners randomly without any repeats — can you draw a cryptographically random sample of 10 from the list?"},{"title":"Bootstrap resampling for statistics","prompt":"For a bootstrap analysis I need to resample 50 items from my dataset of 50 records with replacement allowed — please draw that sample using secure randomness."},{"title":"Random quiz question selection","prompt":"I have a pool of 30 quiz questions and need to randomly pick 8 distinct ones for today's quiz — can you sample 8 items without replacement using your cryptographic RNG?"}],"resultDescription":"Returns the sampled items in draw order along with their original indices in the input array, plus the number of CSPRNG bytes consumed (for reproducible byte-cost calculation). When replace=false, each original index appears at most once and count must not exceed input length. When replace=true, indices may repeat.","failureModes":["count exceeds items length when replace=false — returns validation error","items array is empty or count is 0 — rejected by schema minimum constraints","count or items array exceeds 1000 — schema maximum violation","payment not settled — 402 payment required response","malformed request body — 400 bad request","server-side RNG failure — 500 internal server error"],"whenToPreferThis":"Choose this endpoint when you need to draw multiple items from a collection as an ordered sample with cryptographic security guarantees — especially when auditability (via consumed bytes reporting) matters. Prefer it over a shuffle+slice approach when you want explicit control over sample size and replacement semantics. Use replace=false for lottery-style selection (no duplicates) and replace=true for statistical bootstrapping.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:44:42.080Z","isFirstParty":false}