Skip to main content
DELETE
Cancel a sandbox command

Authorizations

Authorization
string
header
required

Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.

Console sessions (Clerk JWTs) act for the signed-in user. To act for a team instead, also send X-Team-Id: <team_id>; it applies only when the user owns or belongs to that team, otherwise the request runs against the user's own account. API keys created inside a team already act for that team and do not need the header.

Path Parameters

id
string
required

Sandbox identifier

commandId
string
required

Command identifier

Pattern: ^[0-9A-Za-z-]{1,64}$

Response

The command had already finished.

id
string
required

Command identifier, scoped to its sandbox.

Example:

"6f1c2b8e-3d4a-4f7b-9a0e-2c5d8e1f4a7b"

status
enum<string>
required

running is the only non-terminal status.

  • exited: the command ended on its own; exitCode holds its code.
  • cancelled: stopped by DELETE.
  • timedOut: stopped at timeoutSeconds.
  • failed: never started; error says why.
  • unknown: the container went away while it ran, for example because the sandbox stopped. Read the outcome from status, not exitCode.
Available options:
running,
exited,
cancelled,
timedOut,
failed,
unknown
exitCode
integer | null
required

The command's exit code when status is exited; null otherwise.

Example:

0

error
string | null
required

Why the command failed to start or did not finish normally, if known.

streamsSeparated
boolean
required

Whether output lines are tagged as stdout or stderr. When false, the logs streams filter is unavailable.

outputBytes
integer<int64>
required

Bytes of output captured so far.

truncated
boolean
required

True once output passed 32 MiB. Further output is dropped; the command keeps running.

cancelRequested
boolean
required

True once a cancel has been requested.

Last modified on November 6, 2026