API Documentation

Our API allows you to easily get the same sort of responses that you'd get from KoalaChat but directly in your code or terminal.


You will need an API key which requires having an active, paid subscription with Koala which start at just $9/month.

If you don't already have an account then first Register. Then, you can sign up for a paid plan.

Once you have an active plan visit your Account page. Click the Add API Key button to create an API key. Then, copy the value of the created key, it will look like this: a0ce8c2f-60ad-4edc-89eb-bd6da042e572.

Calling the API

Below is an example in JavaScript, but you can use any language or CLI tools like curl.

fetch('https://koala.sh/api/gpt/', {
    method: 'POST',
    headers: {
        Authorization: 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    body: JSON.stringify({
        input: 'My name is Bob. What about yours?',
        inputHistory: ['Hello'],
        outputHistory: ['Hi! What is your name?'],
        realTimeData: false,

You will get a JSON response like this:

{"output": "As an AI language model, I don't have a personal name, but you can call me KoalaChat. How can I assist you today, Bob?"}

The only required parameter is the input which is your prompt. You can optionally provide inputHistory and outputHistory as an array of strings to maintain conversation history or for prompt engineering. If provided, they must be of the same length.

You can also specify true for realTimeData to have live data injected into your prompt. If you don't need real-time data, then don't include it.