# Chainlink VRF API Reference [v1]
Source: https://docs.chain.link/vrf/v1/api-reference

> For the complete documentation index, see [llms.txt](/llms.txt).

> **CAUTION: Migrate to VRF V2.5**
>
> VRF V2.5 replaces both VRF V1 and VRF V2 on November 29, 2024. [Migrate to VRF V2.5](/vrf/v2-5/migration-from-v1).

API reference for [`VRFConsumerBase`](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/vrf/VRFConsumerBase.sol).

## Index

### Constructors

| Name                        | Description                         |
| --------------------------- | ----------------------------------- |
| [constructor](#constructor) | Initialize your consuming contract. |

### Functions

| Name                                    | Description                                                  |
| --------------------------------------- | ------------------------------------------------------------ |
| [requestRandomness](#requestrandomness) | Make a request to the VRFCoordinator.                        |
| [fulfillRandomness](#fulfillrandomness) | Called by VRFCoordinator when it receives a valid VRF proof. |

***

## Constructor

Initialize your consuming contract.

```solidity
constructor(address _vrfCoordinator, address _link)
```

- `_vrfCoordinator`: Address of the Chainlink VRF Coordinator. See [Chainlink VRF Addresses](/vrf/v1/supported-networks) for details.
- `_link`: Address of the LINK token. See [LINK Token Addresses](/resources/link-token-contracts) for details.

***

> Note: `_seed` has recently been deprecated.

## Functions

### requestRandomness

Make a request to the VRF coordinator.

```solidity
function requestRandomness(bytes32 _keyHash, uint256 _fee)
    public returns (bytes32 requestId)
```

- `_keyHash`: The public key against which randomness is generated. See [Chainlink VRF supported networks](/vrf/v1/supported-networks) for details.
- `_fee`: The fee, in LINK, for the request. Specified by the oracle.
- `RETURN`: The ID unique to a single request.

### fulfillRandomness

Called by VRFCoordinator when it receives a valid VRF proof. Override this function to act upon the random number generated by Chainlink VRF.

```solidity
function fulfillRandomness(bytes32 requestId, uint256 randomness)
    internal virtual;
```

- `requestId`: The ID initially returned by `requestRandomness`.
- `randomness`: The random number generated by Chainlink VRF.

## Reference

### Maximizing security

Chainlink VRF provides powerful security guarantees and is easy to integrate. However, smart contract security is a nuanced topic. You can read about the [top security considerations for VRF](/vrf/v1/security).