Skip to content
How to get the Api Key
  • Create the application Api Key in Admin Backend-Company-API Key Management.

  • The created Api Key is only valid for the currently selected application.

Note: Once a key is successfully created, it will only be displayed once and cannot be modified. Therefore, please keep your keys safe. If you forget your key, please delete it and create it again.

Examples and Configuration
  • In OpenAPI, all interfaces are authenticated through Header.Authorization, and the parameters are required.
  • headers.LOCALE_LANG is used to set the language of the message returned by the interface. This parameter is optional, default:en, and currently supports the following languages:
languagecode
Englishen
简体中文zh
Españoles
العربيةar
Portuguêspt
Indonesiaid
日本語ja
Pусскийru
Françaisfr
Deutschde
  • Example:
curl
baseUrl: "https://workaibot.com/api"
headers: {
    Authorization: "Bearer {{apikey}}",
    LOCALE_LANG: "zh"
}
  • Example of starting an app conversation
curl
curl --location --request POST 'https://workaibot/api/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId": "xxxxxx",
    "stream": true,
    "detail": false,
    "messages": [
        {
            "content": "Who are you?",
            "role": "user"
        }
    ]
}'