{"uid":"cap_tYZ23e8-n9TkYw52WEk30","slug":"animica-random-shuffle-drng-dd6cd137","name":"Animica Random Shuffle (DRNG)","description":"Fisher-Yates permutation of your list (or of 1..N), up to 10000 items, derived from ONE verified randomness draw. Returns the permutation of 0-based indices plus the shuffled items, with the exact swap-and-byte-consumption rule so you can recompute it offline.","url":"https://animica.dev/x402/random/shuffle","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","description":"shuffle 1..n instead of a supplied list (1..10000); supply exactly one of items or n"},"items":{"type":"array","description":"the list to shuffle, 1..10000 entries (any JSON values)"},"request_id":{"type":"string","description":"your own tag; mixed into the DRNG seed"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001793","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.001794/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5-6jtRpM3DLxQvfHcoJKm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001794","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Shuffles a list or generates a random permutation of 1..n using a Decentralized Random Number Generator (DRNG) with cryptographic attestation","exampleAgentPrompt":"Can you shuffle this list — ['Alice','Bob','Carol','Dave','Eve'] — using Animica's verifiable DRNG and tag the request with 'my-raffle-001' so I can audit it later?","exampleUseCases":[{"title":"Fair raffle winner ordering","prompt":"I have a list of 50 contest entrant names and need to randomly order them for a fair draw — can you shuffle them using Animica's DRNG and give me the shuffled list with an attestation I can show participants?"},{"title":"Random card deck shuffle","prompt":"Shuffle a standard 52-card deck for me using Animica's verifiable randomness, tag the request 'poker-game-042', so we have a cryptographic proof of the shuffle order."},{"title":"Random permutation for A/B test assignment","prompt":"Generate a random permutation of the numbers 1 through 200 using Animica's DRNG — I need to assign users to groups in a verifiably unbiased order for an experiment."}],"resultDescription":"Returns a JSON object containing: the shuffled items array, 0-based permutation indices, item count, randomness source details, DRNG attestation and verification proof, step-by-step derivation rules for recomputation, and payment metadata. The attestation allows anyone to independently verify the shuffle was fair and untampered.","failureModes":["Both 'items' and 'n' supplied simultaneously — endpoint requires exactly one","n out of range (must be 1–10000) — returns validation error","items list exceeds 10000 entries — rejected with size error","Payment not provided or insufficient — x402 payment required ($0.006731 USDC)","Invalid JSON body — parse error returned","DRNG source unavailability — health field indicates degraded state"],"whenToPreferThis":"Choose this endpoint when you need a cryptographically attested, auditable random shuffle — e.g. for lotteries, card games, A/B test assignments, or any scenario where fairness must be verifiable. The attestation and derivation steps distinguish it from simple pseudo-random shuffles. Prefer it over generic randomization when an independent party needs to verify the shuffle was not manipulated.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:50:42.915Z","isFirstParty":false}