/v1/bucket
Bucket a key
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/abtest-api/v1/bucket" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/abtest-api/v1/bucket", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/abtest-api/v1/bucket");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/abtest-api/v1/bucket",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"key": "user-42",
"hash": 2066987872,
"ratio": 0.481258,
"bucket": 48,
"buckets": 100,
"enabled": true,
"experiment": "exp1",
"percentage": 50
},
"meta": {
"timestamp": "2026-06-03T09:25:01.927Z",
"request_id": "fe553bc6-79e1-40ca-b8dd-3fb4a6690d77"
},
"status": "ok",
"message": "Bucket a key",
"success": true
}