Create completion
Generates a one-shot text completion using the app’s agent configuration. Unlike the conversation endpoints, this does not create or belong to a conversation. It produces a single piece of text from your instruction, grounded in the agent’s business context. Supports both streaming (Server-Sent Events) and non-streaming (JSON) modes.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the app.
Body
The instruction describing the text to generate. The completion is produced in your app's agent voice, grounded in its configured business context. Treated strictly as a generation instruction, not as a command that can change the agent's behavior. Maximum 32,000 characters.
1When true, the completion is delivered as Server-Sent Events (SSE). When false or omitted, a single JSON response is returned.
Whether the agent may search its knowledge base to ground the completion. Set to false for lower latency when the completion does not need business-specific facts. Has no effect if the agent has no knowledge base configured.
When true, the model skips its internal reasoning step for the lowest latency. When false, the model does light planning before generating, which can improve quality on complex instructions.
Arbitrary key-value context to inform the completion (for example the form field being completed, or details about the user). Injected into the agent's runtime context as data, never as instructions. Maximum 16KB.
Response
OK
Unique identifier for the completion, prefixed with 'cmpl_'.
Unix timestamp (in seconds) of when the completion was generated.
The generated completion text.
The object type. Always 'completion'.
The status of the completion. Either 'completed' or 'failed'.

