Kill Vm
POST /kill
Kill the VM associated with a session.
This endpoint allows users to manually terminate their VM before the scheduled lifetime expires. Useful for freeing up resources when done with a session.
Multi-node routing:
- The kill is dispatched via Celery to
vm_queue_\{worker_id\}of the owner worker; no HTTP inter-node proxying happens at this layer. If the task lands on the wrong worker and themultinode.strict_kill_ownershipflag is on, the task itself redispatches to the authoritative owner once.
Args: session_id: The session UUID whose VM should be killed
Returns: Success message with the killed VM ID
Raises: 400: Invalid session_id format 403: User doesn't own the session 404: Session not found or no VM assigned to session
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"session_id": {
"type": "string",
"title": "Session Id"
}
},
"type": "object",
"required": [
"session_id"
],
"title": "KillVMRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
session_id | string | Yes |
Responses
200
Successful Response
application/json
Resolved schema:
{}
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |