POST
/
v1
/
agents
/
conversation
cURL
curl --request POST \
  --url https://api.z.ai/api/v1/agents/conversation \
  --header 'Accept-Language: <accept-language>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": "<string>",
  "conversation_id": "<string>",
  "custom_variables": {
    "include_pdf": true,
    "pages": {
      "position": 123,
      "width": 123,
      "height": 123
    }
  }
}'
{
  "conversation_id": "<string>",
  "agent_id": "<string>",
  "choices": [
    {
      "message": [
        {
          "role": "<string>",
          "content": [
            {
              "type": "<string>",
              "tag_cn": "<string>",
              "tag_en": "<string>",
              "file_url": "<string>",
              "image_url": "<string>"
            }
          ]
        }
      ]
    }
  ],
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer <your api key>

Headers

Accept-Language
enum<string>
default:en-US,en
required

Config desired response language for HTTP requests.

Available options:
en-US,en

Body

application/json

Response

200
application/json

Processing successful

The response is of type object.