Catalog/gen-shuffle

Generators

Seeded array shuffle API

Returns an unbiased Fisher-Yates permutation of an array driven by a seed. The value-add: reproducible shuffles for fixtures/A-B ordering, getting the unbiased swap range exactly right. Answers 'How do I shuffle this array deterministically?', 'Give me a reproducible permutation.'.

Price$0.01per request
MethodPOST
Route/v1/generate/shuffle
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
shufflepermutationfisher-yatesdeterministicseedsamplingarraygenerate
API URLhttps://x402.hexl.dev/v1/generate/shuffle
Integration docs
Example request
{
  "items": [
    1,
    2,
    3,
    4,
    5
  ],
  "seed": "abc"
}
Example response
{
  "shuffled": [
    4,
    2,
    1,
    5,
    3
  ],
  "count": 5,
  "seed": "abc",
  "algorithm": "Fisher-Yates",
  "deterministic": true,
  "interpretation": "Unbiased seeded permutation; same seed reproduces the exact ordering."
}
Input schema
{
  "type": "object",
  "required": [
    "items",
    "seed"
  ],
  "properties": {
    "items": {
      "type": "array",
      "examples": [
        [
          1,
          2,
          3,
          4,
          5
        ]
      ]
    },
    "seed": {
      "type": [
        "string",
        "number"
      ],
      "examples": [
        "abc"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}