Sandboxes

Run a command in the sandbox. Streams NDJSON lines (application/x-ndjson): {"stdout": ...}/{"stderr": ...} chunks followed by exactly one terminal {"returncode": N} or {"error": msg} line.

post/v1/sandboxes/{sandbox_id}/exec

Request

  • Base URL: https://api.deepinfra.com
  • URL: https://api.deepinfra.com/v1/sandboxes/{sandbox_id}/exec
  • Auth: HTTP bearer

Path parameters

sandbox_idstring required

Headers

xi-api-keystring nullable
x-api-keystring nullable

Request body

commandstring[] required
timeout_secondsinteger

Seconds to allow the command to run before it's killed. 0 uses the server default (60s). Capped at 1800s (30 minutes).

Response

Successful Response

unknown required

Changes