Skip to content

Create Run ​

http
POST /api/v1/sessions/{sid}/runs

Create a subsequent run. Sessions created with allow_multiple_runs=false reject this operation with 409 multiple_runs_not_allowed. Deleting, deleted or unavailable environments reject new input with 409 session_unavailable; create a new session with the required context. If external sandbox loss is discovered after acceptance, the run fails asynchronously with sandbox_lost. Idempotent replay of an accepted request returns the original acceptance, regardless of sandbox state.

operationId: create_run

Authentication ​

HTTPBearer

See browser access. Session mutations require a Bearer key.

Parameters ​

NameInRequiredTypeDescription and constraints
sidpathYesstringformat: "uuid"
Idempotency-KeyheaderNostring / null

Request body ​

application/json: CreateRun

json
{
  "$ref": "#/components/schemas/CreateRun"
}

Responses ​

CodeDescriptionContent
202Successful Responseapplication/json: Accepted
400Bad Requestapplication/json: ErrorResponse
401Unauthorizedapplication/json: ErrorResponse
403Browser sessions allow reading only (read_only_access).application/json: ErrorResponse
404Not Foundapplication/json: ErrorResponse
409Conflictapplication/json: ErrorResponse
413Content Too Largeapplication/json: ErrorResponse
415Unsupported Media Typeapplication/json: ErrorResponse
422Unprocessable Contentapplication/json: ErrorResponse
503Service Unavailableapplication/json: ErrorResponse

Response headers 202 ​

  • Location: URL of the accepted run. string

HTTP API