Generate the next message in a conversation
POST/v1/projects/:project_id/conversations/:conversation_id/generate
Generates the next message using the specified actor's linked agent or chat.
Background by default: returns 202 Accepted immediately and the reply
lands as a new ConversationMessage when it completes — poll
GET /v1/projects/{project_id}/conversations/{conversation_id}/messages for it.
Pass ?wait=true to block and receive the result inline. On
completed, the reply is persisted as a new ConversationMessage
authored by that actor. On requires_action, nothing is persisted; the
caller must submit tool outputs via the Agents module and re-invoke
generate — so a flow using client tools should pass ?wait=true.
Request
Responses
- 200
- 202
- 400
- 401
- 403
- 404
- 429
- 501
Generation completed or requires action (only when ?wait=true)
Generation accepted and running in the background (default, when wait is omitted or false). The reply is persisted as a ConversationMessage when it completes.
Invalid request
Unauthorized
Forbidden
Conversation or actor not found
QUOTA_EXCEEDED: an enforce-mode generation quota is exhausted. error.meta carries quota_id, metric, limit, window and resets_at, with a Retry-After header. Only with ?wait=true: a background call is answered 202 before the quota is read.
Streaming not implemented