Skip to main content
POST
/
api
/
chat
/
completions
Streams chat completions for a conversation (Auth policies: ApiKeyOrJwt)
curl --request POST \
  --url https://app.codealive.ai/api/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": "What are the key features of CodeAlive?"
    }
  ],
  "stream": true,
  "dataSources": [
    {
      "id": "repository456"
    }
  ],
  "names": [
    "MyWorkspace",
    "my-repository"
  ],
  "consumerType": "ApiChat",
  "debug": false
}
'
"<string>"

Authorizations

Authorization
string
header
required

API Key authentication using Bearer token. Example: "Authorization: Bearer {apiKey}"

Headers

CodeAlive-Version
string

Body

The chat completion request

messages
object[] | null
stream
boolean
conversationId
string | null
dataSources
object[] | null
names
string[] | null
consumerType
enum<string>
Available options:
ApiChat,
WebChat,
Playground,
SharedChat
debug
boolean

Response

OK

The response is of type string.