✏ī¸Quick Start

A Quick Start guide for Random Stuff API

Good to know: This guide is just a quick start guide, head over to API Reference for all details.

Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from your Dashboard at any time.

Install the library

The best way to interact with our API is to use one of our official libraries:

# Install via pip
pip install --upgrade yarsaw

Good to know: You can make a wrapper for our API as well and get it listed here!

Make your first request

To make your first request, send an authenticated request to the ai endpoint. This will return a json object, which contains our AI Response.

Good to know: We are using Python Library (YARSAW) to make the requests.

Take a look at how you might call this method using our official libraries, or via curl:

import yarsaw
import asyncio  # default
client = yarsaw.Client("RSA KEY HERE", "RapidAPI KEY HERE")
async def main():
    keep_talking = True

    while keep_talking:  # Start loop
        cin = input("You:\t")

        if cin == "exit":
            keep_talking = False  # end loop
        else:
            res = await client.get_ai_response(cin, bot_name="yarsaw")
            print("Bot:\t" + res.response)

    await client.disconnect()  # disconnect the client at the end of the loop

asyncio.get_event_loop().run_until_complete(main())

Last updated