# Tutorial

## Tutorial

The following is an illustrative example of generating an array of three-digit random numbers.

### Authentication

Make sure you provide an[ API in the header](/cryptosat/api-documentation/authentication.md).

### Get public randomness

Send the following request:

**GET** [`https://api.cryptosat.io/api/randomness?num=3`](https://api.cryptosat.io/api/randomness?num=3)

You should get the following similar response:

```json
{
    "random_numbers": [
        0.548,
        0.361,
        0.74
    ]
}
```

Note that the `num` query parameter corresponds to the desired amount of generated random numbers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptosat.io/cryptosat/api-documentation/randomness-api/tutorial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
