Quick Start

Documentation for EchoBot API, links: Official website: https://echobot.ai/ EchoBot portal: https://portal.echobot.ai/

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 the EchoBot portal in the API section of the account page. Or at this link: https://portal.echobot.ai/account?currentTab=apikey. To create an API key click on the create button on the top right.

You may specify the maximum allowed credits and the expiration date for the API key. For no limit on credits set to -1.

The API is accessible to the Starter, Premium and Enterprise plans.

Official Endpoint

The best way to interact with our API is through our official endpoint: https://portal.echobot.ai/api/openapi

baseUrl: "https://portal.echobot.ai/api/openapi"
headers: {
    // Example Key
    apikey: "echobot-r5lbdhot32hvcfd1wg12"
}

Good to know: The EchoBot Starter plan allows up to 3000 messages per month!

Make your first request

To make your first request, send an authenticated request to the completions endpoint. This will generate a response based on a prompt or list of conversation messages.

Application Conversation

POST https://portal.echobot.ai/api/openapi/v1/chat/completions

Send a chat message

Headers

Name
Type
Description

Bearer *

String

You can generate an API key from the EchoBot portal in the account's API section.

It is in this format: f"{echobot_token}-{echobot_botId}"

Request Body

Name
Type
Description

chatId*

string

When undefined (not passed in), the context function provided by EchoBot is not used, and the context is built entirely from the incoming messages. - When '' is null, it means the first conversation in the new window. The response value will have a newChatId - When it is a non-empty string, it means that the chatId is used for the conversation and the history is automatically fetched from the EchoBot database.

stream

boolean

Weather to stream the response of not

messages

list

List of messages, this is the same format as OpenAI chat completions.

"rawSearch": [
        {
            "id": "19339",
            "q": "Who is the director of the movie Journey to Bell Bud?" .
            "a": "The director of the movie Journey to Suzumiya is Makoto Shinkai." .
            "source": ""
        },
        {
            "id": "8099",
            "q": "Who is the main character of this work?" .
            "a": "The main character of this work is a young girl named Suzumiya." .
            "source": "Manual modification"
        }
    ],
    "newChatId": "648f0fc12e0d47315f3bc30e",
    "id": "",
    "model": "gpt-3.5-turbo-16k",
    "usage": {
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 373
    },
    "choices": [
        {
            "message": [
                {
                    "role": "assistant",
                    "content": "The director of the movie Reiya no Trip is Makoto Shinkai."
                }
            ],
            "finish_reason": "stop",
            "index": 0
        }
    ]
}

Good to know: The EchoBot API is only available to the Starterm, Premium and Enterprise users, you will not see the API section if you are on any other plan.

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

curl --location --request POST 'https://portal.echobot.ai/api/openapi/v1/chat/completions' \
--header 'Authorization: Bearer apikey-botId' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId":"",
    "stream":false,
    "messages": [
        {
            "content": "Hi!",
            "role": "user"
        }
    ]
}'

Last updated