Skip to content

create

Request

Security
ApiKeyAuth
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://llm-api.treasuredata.com/api/chats \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "type": "chats",
      "attributes": {
        "agentId": "00000000-0000-0000-0000-000000000001",
        "promptId": "00000000-0000-0000-0000-000000000001",
        "integrationId": "00000000-0000-0000-0000-000000000001",
        "attachments": [
          {
            "binaryBase64": "<BASE64_CONTENT>=",
            "contentType": "image/png",
            "inputFieldName": "input_field_name"
          }
        ],
        "actionId": "00000000-0000-0000-0000-000000000001",
        "formInterfaceId": "00000000-0000-0000-0000-000000000001",
        "inputParameters": "{\"subject\":\"Welcome to our newest gummy bear\",\"topic\":\"New lemon flavored gummy bear in our collection\"}",
        "chatInterfaceId": "00000000-0000-0000-0000-000000000001",
        "textResourceId": "00000000-0000-0000-0000-000000000001",
        "userProperties": null
      }
    }
  }'

Responses

POST /api/chats normalizes null userProperties to empty array

Bodyapplication/vnd.api+json
dataobjectrequired
Response
{ "data": { "id": "00000000-0000-0000-0000-000000000001", "type": "chats", "links": {}, "attributes": {} } }