v1

latestOpenAPI 3.1.02026-08-06192355.6 KB
Chat

Chat

post/api/v1/chat/completions

Headers

CodeGPT-Org-Idstring

Organization ID that agents and documents belong to.

Request body

OR

Example request

{
  "agentId": "0000-0000-0000-0000",
  "messages": [
    {
      "role": "assistant",
      "content": "Hello, how can I help you?"
    }
  ]
}

Response

Successful Response

agentNamestring required

Name of the agent

Example response

{
  "agentName": "Agent P",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello, how can I help you?"
      }
    }
  ]
}