Skip to main content
Chat With Agents
curl --request POST \
  --url https://{api_endpoint}/api/v1/orchestrate/{agent_id}/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "role": "<string>",
      "content": [
        {
          "response_type": "conversational_search",
          "json_schema": {},
          "ui_schema": {},
          "form_data": {},
          "id": "<string>",
          "form_operation": "<string>",
          "sub_type": "<string>",
          "event_type": "<string>",
          "dps_payload_id": "<string>"
        }
      ]
    }
  ],
  "additional_parameters": {},
  "context": {},
  "stream": true
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {}
  ],
  "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-IBM-THREAD-ID
string | null

Optional header to specify the thread ID

Path Parameters

agent_id
string
required

Body

application/json
messages
CreateMessageV2 · object[]
required
additional_parameters
object | null
context
object | null

Optional context dictionary

stream
boolean
default:true

Response

Successful Response

id
string<uuid>
required
object
string
required
created
integer
required
model
string
required
choices
Choices · object[]
required
thread_id
string<uuid>
required