Skip to main content
POST
Stream API v2 completion

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
apiIntegrationId
string
required
message
string
required
agent
string

Agency entry point. The integration default is used when omitted.

chatId
string | null
aliasChatId
string | null
attachments
object[]
Maximum array length: 5
sandboxFiles
object[]

Files already uploaded into this integration's persistent agency mount. The agent can read these paths with sandbox tools; send images in attachments as well when the model should see them.

Maximum array length: 5
user_context
consumerId
string

Required when member allowances are enabled.

usageRequestId
string

Unique ID for this request, included in chat status and usage records. Required when allowances are enabled. Match it when recovering an interrupted request.

attachmentUrlRefreshes
object

Map each expired earlier attachment URL without its query string to a fresh HTTPS URL with the same host and path. Include all earlier conversation files that need refreshing.

Response

Server-sent events by default, or plain text when Text Only Mode is enabled for the integration.

The response is of type string.