---
title: "Generate random bytes"
method: POST
path: "/sys/tools/random/{urlbytes}"
tags: ["system"]
---

# Generate random bytes

`POST /sys/tools/random/{urlbytes}`

## Request body

- SystemToolsRandomRequest
  - `bytes` integer — The number of bytes to generate (POST body parameter). Defaults to 32 (256 bits).
  - `format` string — Encoding format to use. Can be "hex" or "base64". Defaults to "base64".
  - `source` string — Which system to source random data from, ether "platform", "seal", or "all".
  - `urlbytes` string — The number of bytes to generate (POST URL parameter)

## Response `200`

OK

---

[API](https://skmtc.net/lensesio/apis/hashicorp-vault-api.md) · [All operations](https://skmtc.net/lensesio/apis/hashicorp-vault-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lensesio/hashicorp-vault-api/versions/bd8194de0697/schema)
