TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Download deterministic pseudo-random bytes

GEThttps://api.testingapis.com/api/files/bytes/{n}Sign in to see this endpoint's URL

The X-Content-SHA256 response header carries the body's hash for verification.

Parameters 2

NameTypeDescription
nrequiredpath · integer (int32)Number of bytes, 0–10485760 (10 MB).
seedquery · integer (int32)Random seed, default 42. The same n and seed always return the same bytes. Default: 42.

Responses

200
Success.
400
n is outside 0–10485760.

Example

Request
curl -X GET "https://api.testingapis.com/api/files/bytes/16" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=bytes-16-seed-42.bin; filename*=UTF-8''bytes-16-seed-42.bin
X-Content-SHA256: 3a2a115512803d416561b59ce62631f3e1a70cd6a4e1ee8a6a2b24c392e07a5a

<binary body: 16 bytes, application/octet-stream>

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.