Create Completion
Completions
Create Completion
Create a completion for the specified agent.
This endpoint handles two types of requests:
- Normal completion request: User message -> Agent response
- Tool approval response: User approval -> Execute tool -> Agent response
Tool Approval Flow (for MCP tools with requiresApproval: true):
- Request 1: User sends message -> Agent requests tool call -> Return approval request
- Request 2: User approves -> Execute tool -> Agent continues with result
POST
Create Completion
Required ACL:
searchHeaders
Path Parameters
Query Parameters
Compatibility mode for the completion API
Available options:
ai-sdk-4, ai-sdk-5 Whether to stream the response or not
Use cached responses if available
Set to false to disable memory (enabled by default)
Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows.
Body
application/json
Request model for creating a completion for an assistant.
Response
Successful Response
Last modified on June 5, 2026