API ReferenceSessions (prev Tool Router)
Delete a tool router sessionv3.1
Deletes a tool router session. The session immediately stops being retrievable and executable — subsequent requests against it (including its MCP URL) return 404 — and any compute sandboxes attached to the session are shut down. Deleting an already-deleted session returns 404.
Authorization
ApiKeyAuth x-api-key<token>
Project API key authentication
In: header
Path Parameters
session_idstringRequired
The unique identifier of the tool router session
Format:
toolRouterSessionIdResponse Body
application/json
application/json
application/json
application/json
application/json
import requestsurl = "https://example.com/api/v3.1/tool_router/session/trs_1a2b3c4d5e6f"response = requests.request("DELETE", url)print(response.text){ "session_id": "trs_1a2b3c4d5e6f", "deleted": true}