Skip to main content
GET
/
backend
/
chat
/
init
curl --location 'https://api-v2.opencopilot.so/backend/chat/init' \
  --header 'X-Bot-Token: BOT_TOKEN' \
  --header 'X-Session-Id: SESSION_ID' \
{
    "type": "text",
    "response": [
        "text" "The copilot response!"
    ]
}
This endpoint points to the (v2) version of the API. The (v2) version of the API is the latest version and is recommended for all new development. Please update your code to use the (v2) version of the API.

Body

X-Bot-Token
string
Your copilot uniuqe token, can be obtained from the dashboard or from get copilot endpoint
X-Session-Id
string
The session id, you can generate a new session id for each chat, or use the same session id for the same chat

Response

type
string
The copilot response type, currently it only support text
response
object
copilot information
curl --location 'https://api-v2.opencopilot.so/backend/chat/init' \
  --header 'X-Bot-Token: BOT_TOKEN' \
  --header 'X-Session-Id: SESSION_ID' \
{
    "type": "text",
    "response": [
        "text" "The copilot response!"
    ]
}