Follow these steps to access the API:
The API endpoint is /api/getvid and you will need to append the api_token parameter to the query string.
The response will be a JSON-formatted record containing the random video ID, eg:
Please note that the API is rate-limited for free accounts and the API will only have access to the same 10,000 random videos each month that are available via the watch page. Paid accounts have access to the entire database of random videos and there is no rate-limiting on the API.