Submit tool outputs for a paused generation
POST/v1/projects/:project_id/agents/:agent_id/generate/:generation_id/tool-outputs
Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call. Requires agents:CreateAgentGeneration on the agent in addition to generations:ResumeGeneration on the generation. The resumed segment runs under the generation's stored authority held to the caller's, so a resume never widens what the turn may do.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
- 502
- 4XX
Generation result after resuming
Bad Request
Unauthorized
Forbidden
Agent or generation not found
The generation is not paused on client tool calls (GENERATION_NOT_AWAITING_TOOL_OUTPUTS): it never paused, or its outputs were already submitted. Each pause accepts outputs once.
REQUEST_REJECTED — the request body is over the size the body parser accepts
QUOTA_EXCEEDED — a requests quota on the calling API key or its project is spent for the window; Retry-After says when it reopens
Response Headers
Seconds until the quota window admits a request again
Unexpected server error — INTERNAL_ERROR, with the raw message never forwarded
Upstream AI provider error (AI_PROVIDER_ERROR); model output that does not satisfy the agent's output_schema (OUTPUT_SCHEMA_VALIDATION_FAILED); or a model that wrote a tool invocation out as plain assistant text instead of calling the tool (TEXT_ENCODED_TOOL_CALL — meta.tool_name names the tool). The resumed generation is recorded failed.
The deployment's admission service refused this write — answered under the service's own 4xx status, with its code (matching ^[A-Za-z_][A-Za-z0-9_]{0,63}$, not necessarily an ERROR_CODES key), message and meta; the write did not happen. A status this operation also declares on its own is documented there