Spinvoke

Developer API / Standard + Chaos beta

A little chance.
A precise contract.

Give your server a fair roll, a weighted choice or a freshly shuffled list. You supply the options. Spinvoke returns the result.

Get a server key/Read the docs

Standard keeps explicit odds. Chaos evolves isolated Lorenz state per developer key. No global storms, DB anomalies, Party Mode control or legacy spin logging.

One request. Your result.

Confirm your email below, create a key, then call the endpoint from your server. Documentation is public; an account is only needed for keys.

POST/api/v1/randomize.php

Server-side only. Set SPINVOKE_API_KEY privately in your server environment; the shell expands it in the curl below. Never ship a key in browser JavaScript, mobile bundles, public repositories or URLs.

Example request
curl https://spinvoke.app/api/v1/randomize.php \
  -H "Authorization: Bearer ${SPINVOKE_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data '{"mode":"standard","operation":"weighted_pick","items":["pizza","sushi","tacos"],"weights":[0,2,1]}'

Illustrative request, not a live API call. The example selector below updates this snippet.

Choose the operation.

Every request explicitly sets mode: "standard" or mode: "chaos". Unknown fields and unsupported combinations are rejected. Use opaque item IDs, not personal data or full choice descriptions.

{
  "mode": "standard",
  "operation": "weighted_pick",
  "items": [
    "pizza",
    "sushi",
    "tacos"
  ],
  "weights": [
    0,
    2,
    1
  ]
}
integer
Standard only. One integer between min and max, inclusive. Bounds must be ordered, safe integers.
pick
Standard: equal probability per position. Chaos: starts with weight 1 per position, then applies dynamic weights.
weighted_pick
Standard: probability weight / total; zero-weight items cannot win. Supply one nonnegative integer weight per item; the total must be positive and safe. Chaos: canonical non-storm projection changes these odds, with a 0.01 minimum dynamic weight: even a supplied zero remains selectable. All-zero inputs are rejected in both modes.
shuffle
Standard only. A random permutation of your items. All positions are retained, including duplicates.

Key-local Chaos, not global app activity.

Chaos supports only pick and weighted_pick. Optional butterfly_jitter is a UTF-8 string of at most 256 bytes, not a deterministic seed. Heat comes from admitted requests per key in the current minute, including standard requests; only Chaos evolves its state. Separate keys have separate state, even on one account. No shared app state, global storms, evasive effects, DB anomalies or spin-event persistence. Chaos changes probabilities; this is not a cryptographic randomness service.

The response

{
  "success": true,
  "request_id": "example-request-id",
  "mode": "standard",
  "operation": "weighted_pick",
  "result": "sushi"
}

Illustrative standard weighted_pick response, not live output and not a Chaos response. A result is an integer, item ID or array, depending on the operation. Chaos additionally returns a chaos object with scope: "developer_key", key-local heat, update_count, canonical Lorenz state, dynamic weights and authoritative selection. Its storm_active: false and evasive_mode: false mark unsupported integrations, not global observations. Keep the real request_id for support.

Small, explicit boundaries.

  • Lists contain 1–1,000 item IDs. Each ID is 1–128 characters: letters, numbers, _ . : -.
  • Integers and the sum of weights must stay within JavaScript’s safe integer range (±9,007,199,254,740,991).
  • Portal-issued keys allow 60 admissions per fixed UTC minute and 1,000 per UTC day per key, not per account. Both modes share these counters; usage shows lifetime admissions across your keys. Invalid or rejected requests consume no quota.
  • No deterministic seed or app/Party Mode control. Chaos integer and shuffle are rejected, not silently mapped to standard.

Handle errors, not guesses.

Check the HTTP status before reading result. Error responses contain error.code and error.message. A validation error means fix the request; 401 means check the key; 429 means slow down; 503 means the service is unavailable. Never turn an error into an invented result.