Run a command in a pod
Run one command inside a running Runpod Pod’s container and get its stdout, stderr, and exit code back, with no SSH setup.
Authorizations
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.
Body
Command to run, as an argv array of 1-256 arguments of at most 4096
characters each. It is run directly, never through a shell; for
pipes, redirects or globbing pass ["sh", "-c", "..."]. The first
element, the program, must contain a non-whitespace character;
later arguments may be empty. No argument may contain a NUL
character.
Response
The command finished or the call stopped waiting for it. A non-zero exitCode is a result, not an error.