Sessions

Submit tool outputs

Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result. A generation that did not run in the session's conversation is 404 (GENERATION_NOT_FOUND) and receives no outputs.

post/v1/projects/{project_id}/sessions/{session_id}/tool-outputs

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/sessions/{session_id}/tool-outputs
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Path parameters

session_idstring required
Example:sess_V1StGXR8Z5jdHi6B

Session public ID

Request body

generation_idstring required

The generation ID from the requires_action response

Response

Generation result

OR

Example response

{
  "content": "Hello! How can I help you today?",
  "message": {
    "document_id": "doc_V1StGXR8Z5jdHi6B",
    "role": "user",
    "actor_id": "actor_V1StGXR8Z5jdHi6B",
    "agent_id": "agent_V1StGXR8Z5jdHi6B",
    "metadata": {
      "author": "John",
      "revision": 2
    },
    "idempotency_key": "wamid.HBgLNTUxMTk4..."
  },
  "generation_id": "gen_V1StGXR8Z5jdHi6B",
  "trace_id": "trace_V1StGXR8Z5jdHi6B",
  "model": "gpt-4o"
}

Changes

No recorded changes to this operation across all 1 revision of this API.