Docs / API Reference / batch
POST /v1/batch QuBitLang

Bulk request up to 100,000 random values in a single API call. Supports integers, floats, bytes, and UUIDs. Optimised for high-throughput applications requiring large volumes of quantum entropy.

Request Body

POST BodyJSON
{ "type": "integers", // integers | floats | bytes | uuid "count": 100000, // Up to 100,000 "params": { "min": 1, "max": 1000000 } }

Parameters

NameTypeRequiredDescription
typestringYesValue type: integers, floats, bytes, uuid
countintegerYesNumber of values (1–100,000)
paramsobjectNoType-specific parameters (min, max, precision, encoding)

Code Examples

batch.py
from trueentropy import TrueEntropy client = TrueEntropy(api_key="te_live_YOUR_KEY") result = client.batch( type="integers", count=100000, params={"min": 1, "max": 1000000} ) print(len(result.values)) # 100000 print(result.metadata.processing_time_ms) # 342
batch.js
import { TrueEntropy } from '@trueentropy/sdk'; const client = new TrueEntropy('te_live_YOUR_KEY'); const result = await client.batch({ type: 'integers', count: 100000, params: { min: 1, max: 1000000 } }); console.log(result.data.values.length); // 100000
batch.php
use TrueEntropy\Client; $client = new Client('te_live_YOUR_KEY'); $result = $client->batch([ 'type' => 'integers', 'count' => 100000, 'params' => ['min' => 1, 'max' => 1000000], ]); echo count($result->values); // 100000
Terminal
curl -X POST https://api.trueentropy.net/v1/batch \ -H "Authorization: Bearer te_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"type":"integers","count":100000,"params":{"min":1,"max":1000000}}'

Response

200 OKJSON
{ "data": { "values": [472193, 829105, 134782, ... 99,997 more], "count": 100000, "type": "integers" }, "metadata": { "request_id": "req_a7b8c9d0e1f2", "timestamp": "2026-03-09T15:42:17Z", "processing_time_ms": 342, "entropy_consumed_bytes": 400000, "qubitlang_circuit": "qrng_hadamard_v2.3", "qubitlang_version": "1.4.0", "quantum_backend": "ibm_fez", "nist_verified": true, "certificate_id": "cert_a7b8c9d0e1f2", "powered_by": "QuBitLang" } }

Response Headers

X-QuBitLang-Circuit: qrng_hadamard_v2.3 X-QuBitLang-Version: 1.4.0 X-Quantum-Backend: ibm_fez X-NIST-Verified: true X-RateLimit-Remaining: 47 X-RateLimit-Reset: 1741536180

Errors

StatusCodeDescription
400invalid_typetype must be integers, floats, bytes, or uuid
400invalid_countcount must be between 1 and 100,000
400invalid_rangemin must be less than max (integers)
401auth_missingNo API key provided
401auth_invalidAPI key is invalid or revoked
403auth_scopeAPI key lacks entropy:batch scope
429rate_limitedRate limit exceeded