# API reference

### Authentication

This API relies on provisioned API keys for authentication and access. In order to obtain a key, please contact us.

[Read more](/cryptosat/api-documentation/authentication.md)

### Public randomness

Invoke the following API to receive public randomness

## Get public randomness

<mark style="color:blue;">`GET`</mark> `https://api.cryptosat.io/api/randomness?num=`

#### Query Parameters

| Name | Type   | Description                          |
| ---- | ------ | ------------------------------------ |
| num  | String | amount of random numbers to generate |

#### Headers

| Name                                        | Type   | Description      |
| ------------------------------------------- | ------ | ---------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Required API Key |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "request": {
    "request_uuid": "string",
    "request_name": "string",
    "request_verb": "string",
    "response_eta": "string",
    "created_at": "string",
    "satellite_id": "string",
    "request_status": {
      "status_code": "string",
      "request_status": "string"
    }
  }
}
```

{% endtab %}

{% tab title="403: Forbidden Please check your API key" %}

{% endtab %}
{% endtabs %}


---

# 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/api-reference.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.
