POST
/
get_completion
curl --request POST \
  --url https://agency-swarm-app-japboyzddq-uc.a.run.app/get_completion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "message": "<string>",
  "apiIntegrationId": "<string>",
  "chatId": "<string>",
  "attachments": [
    {
      "file_id": "<string>",
      "tools": [
        {
          "type": "<string>"
        }
      ]
    }
  ],
  "additionalInstructions": "<string>",
  "aliasChatId": "<string>"
}'
{
  "chatId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "threadId": "<string>",
  "assistantId": "<string>",
  "name": "<string>",
  "message": {
    "id": "<string>",
    "content": "<string>",
    "role": "<string>",
    "type": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "references": [
      "<string>"
    ],
    "fileIds": [
      "<string>"
    ],
    "assistantData": {},
    "functions": {}
  },
  "numMessages": 123,
  "aliasChatId": "<string>"
}

Authorizations

Authorization
string
header
required

Platform token required for authentication. Find or create one inside Profile Icon > API Keys. Example: Bearer sk-agencii-...

Body

application/json

Request body for the /get_completion endpoint.

Response

200
application/json

Successful response. The format varies depending on the textOnly mode configured for the API Integration. If textOnly is enabled, the response is plain text. Otherwise, it's application/json.

Response body for the /get_completion endpoint when textOnly mode is disabled.