Stream API v2 completion

Changed on

Starts an SSE agent run. When allowances are enabled, consumerId and usageRequestId are required. An in-progress response may finish above the limit; the next request is rejected. Every request must use the integration owner's API key. Errors with X-Agent-Run-Admitted: false were rejected before reserving a run. If that header is absent after an interruption, check chat status using the same usageRequestId before retrying. A failed response stays in chat history. Its attachments are not sent again in later turns; attach them again to retry. Other messages and their successful attachments remain available.

post/get_completion_v2

Request

  • Base URL
    https://api-integration-v2-qd6wo466iq-uc.a.run.app
  • URL
    https://api-integration-v2-qd6wo466iq-uc.a.run.app/get_completion_v2
  • Auth
    HTTP bearer

Request body

apiIntegrationIdstring required
messagestring required
agentstring

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

chatIdstring nullable
aliasChatIdstring nullable
consumerIdstring

Required when member allowances are enabled.

usageRequestIdstring

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

attachmentUrlRefreshesobject

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.

Changes