> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# random

Provides a random number to be used as a source of entropy for random number generation by clients.

This method will use `20` [Compute Units](/nodeapi/about/billing).

***

## Reference: [Here](https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/utility-methods/random)

## **Parameters**

`None`

## Returns

* `random` (string) Random 256-bit hex value.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "result": {
    "random": "31961697CC7874B85BCA6F0F731F0C2449122BFCB9E74A8493F6C91343B6D81D",
    "status": "success"
  }
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"method":"random","params":[{}]}'
  ```
</CodeGroup>

Over WebSocket, send `{"id":1,"command":"random"}` to `wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.