Get completion
Processes a message using the specified API integration and returns a completion from the agent. Requires a valid platform token. Ensure the apiIntegrationId is valid. Supports continuing existing chats via chatId or aliasChatId and attaching files with tools.
Authorizations
Platform token required for authentication. Find or create one inside Profile Icon > API Keys. Example: Bearer sk-agencii-...
Body
Request body for the /get_completion endpoint.
The message content to be processed by the agent. Example: "Hey! How are you?"
The unique identifier for the API integration being used. Example: "dpCD7snQ0tCWrdtp6UhZ"
The unique identifier for the chat session. If provided, continues the chat with the previous context. Example: "plOQeH3hW7UKiACqEdAx"
An array of attachment objects to include files and specify tools for processing. Example: [{"file_id": "file-123", "tools": [{"type": "file_search"}]}]
Object representing a file attachment.
Appends additional instructions at the end of the agent's instructions for the run. Useful for modifying behavior per-run. Example: "User name: John Smith"
An alternative to chatId which allows using custom identifiers for persisting chats through third party integrations. Example: "custom-identifier"
Response
Response body for the /get_completion endpoint when textOnly mode is disabled.
The unique identifier for the chat session. Example: "FVfA971B3fnBH4S1OKlo"
The timestamp when the response was created (ISO 8601 format). Example: "2024-08-06T02:02:37.533913"
The unique identifier for the underlying thread. Example: "thread_ruUj69CyW2STm8Zog0HXkvIJ"
The unique identifier for the assistant that responded. Example: "J3NQwdHxqm9jvWFpOwFk"
The name of the API integration used. Example: "Test API Integration"
The message object containing the agent's response details.
The total number of messages in the chat thread. Example: 2
Alternative chat identifier used for persisting chats through third party integrations. Example: "r14ud3CyX21Tm8Zog0HKJkvZJ"