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

# Random Number Generator

Generate a cryptographically secure random number in range [0, 1). Uses Web Crypto API for security-grade randomness. No inputs required. Ideal for: random selections, percentage-based triggers, A/B testing, lottery mechanics.

Catalog action Utility

Generate a cryptographically secure random number in range [0, 1). Uses Web Crypto API for security-grade randomness. No inputs required. Ideal for: random selections, percentage-based triggers, A/B testing, lottery mechanics.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `random-number` |
| Category | Utility |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `random`, `number`, `generator`, `utility`, `crypto`, `secure`, `read` |

## Payload Schema

This action does not declare payload fields.

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | Yes | Cryptographically secure random floating point number in the range \[0, 1\) |

## Examples

**Workflow node**

```json
{
  "type": "random-number",
  "payload": {},
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/random-number/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {}
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.