sandpi/ platform

Core concepts

Sessions & Runs

Retain native history, queue tasks and retry submissions.

On this page

Start a conversation

A Session is a logical headless conversation inside an Environment. It fixes the Harness and uses your native model connection and resumes the same native conversation across Runs. It is separate from the interactive TUI’s PTY session.

Create a harness Session

POST /v1/environments/{environmentId}/sessions

Create a Session using a model vendor’s native Harness and your own API or gateway. Pi requires connection.api. No Sandpi Token purchase or model-price catalog is needed.

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.

Request example

sh
curl -X POST \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
  "harness": "codex",
  "connection": {
    "baseUrl": "https://gateway.example.com/v1",
    "apiKey": "YOUR_GATEWAY_KEY"
  }
}'
Request body · required application/json
FieldType and constraintsRequiredDescription
harnessstring · values: "codex" | "claude-code" | "pi" | "kimi-code" | "zcode"YesNative coding-agent program used by the Session.
connectionobject · extra fields rejectedYes—
connection.baseUrlstring · format: uri; max length 2048Yeswithin connectionNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
connection.apiKeystring · min length 1; max length 8192; write onlyYeswithin connectionYour provider or gateway credential. Encrypted at rest, never returned by the API.
connection.headersobject · max 32 keys; write onlyNowithin connectionAdditional native HTTP headers. Stored with the encrypted credential.
connection.headers.{key}string · max length 8192Noadditional keys—
connection.apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"Nowithin connectionPi native API adapter. Required for Pi; other Harnesses use their native API.
connection.contextWindowinteger · ≥ 1024; ≤ 10000000Nowithin connectionPi custom model context capacity; defaults to 128000.
connection.maxOutputTokensinteger · ≥ 1; ≤ 1000000Nowithin connectionPi custom model output capacity; defaults to 16384.
sandboxBudgetUsdnumber · nullable; ≥ 0; ≤ 100000NoOptional lifetime Sandbox execution budget in USD. Converted to cumulative Harness execution time; does not add a Sandbox charge. Omitted or null is unlimited.
Example
Example
{
  "harness": "codex",
  "connection": {
    "baseUrl": "https://gateway.example.com/v1",
    "apiKey": "YOUR_GATEWAY_KEY"
  }
}

Responses

201 Created.
Response body application/json
FieldType and constraintsRequiredDescription
dataobject · extra fields rejectedYesPersistent native Harness conversation. Configure your own provider or gateway; Sandpi charges only Sandbox runtime.
data.idstringYeswithin dataResource identifier used to read or manage this resource.
data.environmentIdstringYeswithin dataEnvironment identifier. It must belong to the caller’s account or Project.
data.harnessstring · values: "codex" | "claude-code" | "pi" | "kimi-code" | "zcode"Yeswithin dataNative coding-agent program used by the Session.
data.providerstring · values: "openai" | "anthropic" | "kimi" | "zai" | "deepseek"Yeswithin dataNative model family associated with this Harness; not a Sandpi Token supplier.
data.nativeSessionIdstringNowithin dataNative harness conversation identifier retained for Session resume.
data.nativeHistoryStatestring · values: "new" | "available" | "unavailable"Yeswithin dataState of the Session’s native conversation history.
data.createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeswithin dataCreation time as a UTC date-time string.
data.connectionobject · extra fields rejectedNowithin data—
data.connection.baseUrlstring · format: uri; max length 2048Yeswithin dataNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
data.connection.apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"Nowithin dataPi native API adapter. Required for Pi; other Harnesses use their native API.
data.connection.revisioninteger · ≥ 1Yeswithin dataImmutable connection revision captured by new Runs. Rotation does not change an existing Run.
Example
Example
{
  "data": {
    "id": "",
    "environmentId": "",
    "harness": "codex",
    "provider": "openai",
    "nativeHistoryState": "new",
    "createdAt": "2026-10-12T01:00:00Z"
  }
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

415 Unsupported request media type.

application/json

503 The selected harness or model route is temporarily unavailable.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

Reuse a Session for follow-up work that benefits from prior native history. Create a new Session for a separate conversation or harness, while remembering that Sessions in the same Environment still share workspace files.

Submit a task

A Run is one task or turn. Select its model explicitly and provide the instructions. File inputs must already exist in the workspace; the Run can reference them by path and optional digest.

Queue an idempotent headless Run

POST /v1/environments/{environmentId}/sessions/{sessionId}/runs

Requires Idempotency-Key. Runs execute serially within an Environment.

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.
path: sessionIdstring · min length 1YesExisting Session identifier within the named Environment.
header: idempotency-keystring · min length 1; max length 128YesStable key for one logical operation. Retry with the same key and exact request body; a new key can admit new work.

Request example

sh
curl -X POST \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions/$SESSION_ID/runs" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN" \
    -H "idempotency-key: $REQUEST_KEY" \
    -H "Content-Type: application/json" \
    -d '{
  "model": "YOUR_SUPPORTED_MODEL_ID",
  "input": "Fix the login error"
}'
Request body · required application/json
FieldType and constraintsRequiredDescription
modelstring · min length 1; max length 200
Validation pattern.*\S.*
YesExact native model ID served by your provider or gateway.
inputstring · min length 1YesInstructions supplied to the agent for this task.
filesarray · max 20 itemsNoFiles associated with this resource; each item is described below.
files[]objectYeseach array item—
files[].pathstring · min length 1; max length 2048Yeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
files[].sha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemLowercase hexadecimal SHA-256 digest of the file bytes.
Example
Example
{
  "model": "YOUR_SUPPORTED_MODEL_ID",
  "input": "Fix the login error"
}

Responses

202 Accepted.
Response body application/json
FieldType and constraintsRequiredDescription
dataobject · extra fields rejectedYesNative task execution, output, file diff and checkpoint state. These states settle independently.
data.idstringYeswithin dataResource identifier used to read or manage this resource.
data.environmentIdstringYeswithin dataEnvironment identifier. It must belong to the caller’s account or Project.
data.sessionIdstringYeswithin dataExisting Session identifier within the named Environment.
data.environmentSequenceinteger · ≥ -9007199254740991; ≤ 9007199254740991Yeswithin dataEnvironment-wide Run ordering across all Sessions; rollback uses this ordering.
data.modelstringYeswithin dataExact native model ID served by your provider or gateway.
data.inputstringYeswithin dataInstructions supplied to the agent for this task.
data.filesarrayYeswithin dataFiles associated with this resource; each item is described below.
data.files[]object · extra fields rejectedYeseach array itemReference to an existing regular workspace file checked before execution.
data.files[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data.files[].sha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemLowercase hexadecimal SHA-256 digest of the file bytes.
data.statusstring · values: "queued" | "running" | "completed" | "failed" | "stopped" | "reverting" | "reverted"Yeswithin dataCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data.stopRequestedbooleanYeswithin dataWhether a client has requested that the native task stop.
data.outputstringNowithin dataFinal agent output when available. Content retention may erase this field.
data.errorobject · extra fields rejectedNowithin dataExecution failure or transient runtime availability diagnostic. While status is running, platform_runtime_unavailable means observation or preparation is blocked; the original task may still be executing. Reuse this Run instead of submitting it again. The diagnostic clears after successful runtime access. Optional timestamped resource samples may be appended asynchronously; these measurements do not establish the timeout cause or OOM.
data.error.codestringNowithin dataStable code identifying an execution failure or transient runtime availability diagnostic.
data.error.messagestringNowithin dataHuman-readable failure or availability diagnostic; it does not by itself establish that the original task stopped.
data.fileDiffarrayYeswithin dataManifest of added, modified and deleted regular workspace files. It does not contain file bytes.
data.fileDiff[]object · extra fields rejectedYeseach array itemRegular workspace file change with before and after content digests.
data.fileDiff[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data.fileDiff[].kindstring · values: "added" | "modified" | "deleted"Yeseach array itemWhether the Run added, modified or deleted the regular file.
data.fileDiff[].beforeSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest before the Run; absent for a newly added file.
data.fileDiff[].afterSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest after the Run; absent for a deleted file.
data.fileDiffStatusstring · values: "pending" | "ready" | "failed"Yeswithin dataFile-diff computation state, separate from execution and checkpoint state.
data.fileDiffErrorstringNowithin dataDiagnostic text when file-diff computation fails.
data.checkpointobject · extra fields rejectedYeswithin dataRootFS checkpoint state and identifier, tracked separately from native execution.
data.checkpoint.statusstring · values: "pending" | "ready" | "failed" | "skipped"Yeswithin dataCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data.checkpoint.snapshotIdstringNowithin dataSandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork.
data.checkpoint.errorstringNowithin dataStructured failure information. Inspect the stable code and retain the request ID for investigation.
data.createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeswithin dataCreation time as a UTC date-time string.
data.startedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Nowithin dataExecution start time as a UTC date-time string.
data.finishedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Nowithin dataTerminal execution time as a UTC date-time string.
data.steeringEnabledbooleanYeswithin dataWhether this Run supports native steering during execution.
data.contentDeletedAtstring · format: date-timeNowithin dataPlatform content was erased; native history and checkpoints remain until Environment deletion.
Example
Example
{
  "data": {
    "id": "",
    "environmentId": "",
    "sessionId": "",
    "environmentSequence": -9007199254740991,
    "model": "",
    "input": "",
    "files": [
      {
        "path": ""
      }
    ],
    "status": "queued",
    "stopRequested": false,
    "fileDiff": [
      {
        "path": "",
        "kind": "added"
      }
    ],
    "fileDiffStatus": "pending",
    "checkpoint": {
      "status": "pending"
    },
    "createdAt": "2026-10-12T01:00:00Z",
    "steeringEnabled": false
  }
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

402 Insufficient Platform credit.

application/json

404 Resource not found or outside token scope.

application/json

409 Resource state conflict.

application/json

415 Unsupported request media type.

application/json

503 Platform execution is unavailable.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

Only one Run executes in an Environment at a time. Runs from different Sessions share the same execution queue and checkpoint boundary. Different Environments can provide independent execution and files.

Make retries safe

Generate one idempotency key per logical submission and persist it with the request body. If the response is lost, retry with that same key, model, input and ordered file references. Reusing a key with changed content conflicts; a new key can create another Run.

The Run continues until the Harness exits, you stop it, or runtime credit, the Team Sandbox budget, or its Session execution allowance is exhausted. An optional Session Sandbox budget converts USD to cumulative execution time across Runs; see Sandbox budgets. Losing an observer connection is not a reason to resubmit.

Read output and state

Get Run state and Sandbox usage

GET /v1/environments/{environmentId}/sessions/{sessionId}/runs/{runId}

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.
path: sessionIdstring · min length 1YesExisting Session identifier within the named Environment.
path: runIdstring · min length 1YesRun identifier within the named Environment and, where applicable, Session.

Request example

sh
curl \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions/$SESSION_ID/runs/$RUN_ID" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN"

No request body.

Responses

200 Successful response.
Response body application/json
FieldType and constraintsRequiredDescription
dataobject · extra fields rejectedYesRun details with posted Sandbox runtime and retained historical managed-model settlement; BYOK model costs are billed by your provider.
data.idstringYeswithin dataResource identifier used to read or manage this resource.
data.environmentIdstringYeswithin dataEnvironment identifier. It must belong to the caller’s account or Project.
data.sessionIdstringYeswithin dataExisting Session identifier within the named Environment.
data.environmentSequenceinteger · ≥ -9007199254740991; ≤ 9007199254740991Yeswithin dataEnvironment-wide Run ordering across all Sessions; rollback uses this ordering.
data.modelstringYeswithin dataExact native model ID served by your provider or gateway.
data.inputstringYeswithin dataInstructions supplied to the agent for this task.
data.filesarrayYeswithin dataFiles associated with this resource; each item is described below.
data.files[]object · extra fields rejectedYeseach array itemReference to an existing regular workspace file checked before execution.
data.files[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data.files[].sha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemLowercase hexadecimal SHA-256 digest of the file bytes.
data.statusstring · values: "queued" | "running" | "completed" | "failed" | "stopped" | "reverting" | "reverted"Yeswithin dataCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data.stopRequestedbooleanYeswithin dataWhether a client has requested that the native task stop.
data.outputstringNowithin dataFinal agent output when available. Content retention may erase this field.
data.fileDiffarrayYeswithin dataManifest of added, modified and deleted regular workspace files. It does not contain file bytes.
data.fileDiff[]object · extra fields rejectedYeseach array itemRegular workspace file change with before and after content digests.
data.fileDiff[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data.fileDiff[].kindstring · values: "added" | "modified" | "deleted"Yeseach array itemWhether the Run added, modified or deleted the regular file.
data.fileDiff[].beforeSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest before the Run; absent for a newly added file.
data.fileDiff[].afterSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest after the Run; absent for a deleted file.
data.fileDiffStatusstring · values: "pending" | "ready" | "failed"Yeswithin dataFile-diff computation state, separate from execution and checkpoint state.
data.fileDiffErrorstringNowithin dataDiagnostic text when file-diff computation fails.
data.checkpointobject · extra fields rejectedYeswithin dataRootFS checkpoint state and identifier, tracked separately from native execution.
data.checkpoint.statusstring · values: "pending" | "ready" | "failed" | "skipped"Yeswithin dataCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data.checkpoint.snapshotIdstringNowithin dataSandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork.
data.checkpoint.errorstringNowithin dataStructured failure information. Inspect the stable code and retain the request ID for investigation.
data.createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeswithin dataCreation time as a UTC date-time string.
data.startedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Nowithin dataExecution start time as a UTC date-time string.
data.finishedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Nowithin dataTerminal execution time as a UTC date-time string.
data.usageobject · extra fields rejectedYeswithin dataPosted Sandbox runtime usage and retained historical managed-model settlement. New BYOK Runs have no rated model-call ledger; provider usage and cost are recorded by the customer’s provider or gateway.
data.usage.callsarrayYeswithin dataHistorical rated managed-model calls only. Empty for new BYOK Runs; does not measure native model requests.
data.usage.calls[]object · extra fields rejectedYeseach array item—
data.usage.calls[].idstringYeseach array itemResource identifier used to read or manage this resource.
data.usage.calls[].providerstring · values: "openai" | "anthropic" | "kimi" | "zai" | "deepseek"Yeseach array itemNative model family associated with this Harness; not a Sandpi Token supplier.
data.usage.calls[].modelstringYeseach array itemExact native model ID served by your provider or gateway.
data.usage.calls[].priceVersionstringYeseach array itemHistorical managed-model settlement only. Immutable version of the published price captured for rating.
data.usage.calls[].priceSourceUrlstring · format: uriYeseach array itemHistorical managed-model settlement only. Official provider pricing reference captured with the immutable price version.
data.usage.calls[].usageCategoriesobjectYeseach array itemHistorical managed-model settlement only. Provider-reported usage by category, such as uncached input, cached input and output tokens.
data.usage.calls[].usageCategories.{key}numberNoadditional keys—
data.usage.calls[].ratedLinesarrayYeseach array itemHistorical managed-model settlement only. Rated accounting line items for the provider call.
data.usage.calls[].ratedLines[]anyYeseach array item—
data.usage.calls[].upstreamAmountUsdstringYeseach array itemHistorical managed-model settlement only. Published base-rate usage amount in USD, represented as a decimal string.
data.usage.calls[].serviceFeeUsdstringYeseach array itemHistorical managed-model settlement only. Itemized service fee in USD, represented as a decimal string.
data.usage.calls[].totalAmountUsdstringYeseach array itemHistorical managed-model settlement only. Total rated charge in USD, represented as a decimal string.
data.usage.calls[].createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeseach array itemCreation time as a UTC date-time string.
data.usage.calls[].serviceFeePercentnumber · values: 0 | 5 | 10 | 15Yeseach array itemHistorical managed-model settlement only. Service fee captured by this call’s immutable price version; zero for legacy calls.
data.usage.serviceFeePercentnumber · values: 0 | 5 | 10 | 15 | nullYeswithin dataHistorical managed-model fee shared by all calls, or null for mixed historical tiers. Zero for new BYOK Runs; Sandpi adds no model service fee.
data.usage.upstreamAmountUsdstringYeswithin dataHistorical managed-model base charges in USD. Zero for new BYOK Runs; excludes charges billed directly by your model provider.
data.usage.serviceFeeUsdstringYeswithin dataHistorical managed-model service fees in USD. Zero for new BYOK Runs.
data.usage.totalAmountUsdstringYeswithin dataPosted Sandbox runtime plus retained historical managed-model charges in USD. Excludes model charges billed directly by your provider or gateway.
data.usage.sandboxAmountUsdstringYeswithin dataPosted Sandbox runtime charge attributed to this Run. Environment initialization and file access may incur separate Environment charges.
data.usage.sandboxRuntimeSecondsnumber · ≥ 0Nowithin dataAuthoritative billed Sandbox time attributed to this Run.
Example
Example
{
  "data": {
    "id": "",
    "environmentId": "",
    "sessionId": "",
    "environmentSequence": -9007199254740991,
    "model": "",
    "input": "",
    "files": [
      {
        "path": ""
      }
    ],
    "status": "queued",
    "stopRequested": false,
    "fileDiff": [
      {
        "path": "",
        "kind": "added"
      }
    ],
    "fileDiffStatus": "pending",
    "checkpoint": {
      "status": "pending"
    },
    "createdAt": "2026-10-12T01:00:00Z",
    "usage": {
      "calls": [],
      "serviceFeePercent": 0,
      "upstreamAmountUsd": "",
      "serviceFeeUsd": "",
      "totalAmountUsd": "",
      "sandboxAmountUsd": ""
    }
  }
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

Execution status, file-diff status, checkpoint status and accounting are separate. A completed Run can have output while its checkpoint is pending. Transient checkpoint failures retry without rerunning the harness. Display output immediately and wait for workspace access to become available before file operations.

Continue or undo

Submit a later Run in the same Session for a follow-up task. Use steering to add instructions during active execution. Use stop and rollback to stop or restore state; rollback affects later Runs across all Sessions, not only the selected conversation.

Browse conversations and submitted work

List Sessions in the Environment, read one Session’s native history state, then list its Runs.

List harness Sessions

GET /v1/environments/{environmentId}/sessions

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.

Request example

sh
curl \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN"

No request body.

Responses

200 Successful response.
Response body application/json
FieldType and constraintsRequiredDescription
dataarrayYesSuccessful result wrapped by the API. The child fields describe its content.
data[]object · extra fields rejectedYeseach array itemPersistent native Harness conversation. Configure your own provider or gateway; Sandpi charges only Sandbox runtime.
data[].idstringYeseach array itemResource identifier used to read or manage this resource.
data[].environmentIdstringYeseach array itemEnvironment identifier. It must belong to the caller’s account or Project.
data[].harnessstring · values: "codex" | "claude-code" | "pi" | "kimi-code" | "zcode"Yeseach array itemNative coding-agent program used by the Session.
data[].providerstring · values: "openai" | "anthropic" | "kimi" | "zai" | "deepseek"Yeseach array itemNative model family associated with this Harness; not a Sandpi Token supplier.
data[].nativeSessionIdstringNoeach array itemNative harness conversation identifier retained for Session resume.
data[].nativeHistoryStatestring · values: "new" | "available" | "unavailable"Yeseach array itemState of the Session’s native conversation history.
data[].createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeseach array itemCreation time as a UTC date-time string.
data[].connectionobject · extra fields rejectedNoeach array item—
data[].connection.baseUrlstring · format: uri; max length 2048Yeseach array itemNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
data[].connection.apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"Noeach array itemPi native API adapter. Required for Pi; other Harnesses use their native API.
data[].connection.revisioninteger · ≥ 1Yeseach array itemImmutable connection revision captured by new Runs. Rotation does not change an existing Run.
Example
Example
{
  "data": [
    {
      "id": "",
      "environmentId": "",
      "harness": "codex",
      "provider": "openai",
      "nativeHistoryState": "new",
      "createdAt": "2026-10-12T01:00:00Z"
    }
  ]
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

Get a harness Session

GET /v1/environments/{environmentId}/sessions/{sessionId}

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.
path: sessionIdstring · min length 1YesExisting Session identifier within the named Environment.

Request example

sh
curl \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions/$SESSION_ID" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN"

No request body.

Responses

200 Successful response.
Response body application/json
FieldType and constraintsRequiredDescription
dataobject · extra fields rejectedYesPersistent native Harness conversation. Configure your own provider or gateway; Sandpi charges only Sandbox runtime.
data.idstringYeswithin dataResource identifier used to read or manage this resource.
data.environmentIdstringYeswithin dataEnvironment identifier. It must belong to the caller’s account or Project.
data.harnessstring · values: "codex" | "claude-code" | "pi" | "kimi-code" | "zcode"Yeswithin dataNative coding-agent program used by the Session.
data.providerstring · values: "openai" | "anthropic" | "kimi" | "zai" | "deepseek"Yeswithin dataNative model family associated with this Harness; not a Sandpi Token supplier.
data.nativeSessionIdstringNowithin dataNative harness conversation identifier retained for Session resume.
data.nativeHistoryStatestring · values: "new" | "available" | "unavailable"Yeswithin dataState of the Session’s native conversation history.
data.createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeswithin dataCreation time as a UTC date-time string.
data.connectionobject · extra fields rejectedNowithin data—
data.connection.baseUrlstring · format: uri; max length 2048Yeswithin dataNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
data.connection.apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"Nowithin dataPi native API adapter. Required for Pi; other Harnesses use their native API.
data.connection.revisioninteger · ≥ 1Yeswithin dataImmutable connection revision captured by new Runs. Rotation does not change an existing Run.
Example
Example
{
  "data": {
    "id": "",
    "environmentId": "",
    "harness": "codex",
    "provider": "openai",
    "nativeHistoryState": "new",
    "createdAt": "2026-10-12T01:00:00Z"
  }
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

List Session Runs

GET /v1/environments/{environmentId}/sessions/{sessionId}/runs

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.
path: sessionIdstring · min length 1YesExisting Session identifier within the named Environment.

Request example

sh
curl \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions/$SESSION_ID/runs" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN"

No request body.

Responses

200 Successful response.
Response body application/json
FieldType and constraintsRequiredDescription
dataarrayYesSuccessful result wrapped by the API. The child fields describe its content.
data[]object · extra fields rejectedYeseach array itemNative task execution, output, file diff and checkpoint state. These states settle independently.
data[].idstringYeseach array itemResource identifier used to read or manage this resource.
data[].environmentIdstringYeseach array itemEnvironment identifier. It must belong to the caller’s account or Project.
data[].sessionIdstringYeseach array itemExisting Session identifier within the named Environment.
data[].environmentSequenceinteger · ≥ -9007199254740991; ≤ 9007199254740991Yeseach array itemEnvironment-wide Run ordering across all Sessions; rollback uses this ordering.
data[].modelstringYeseach array itemExact native model ID served by your provider or gateway.
data[].inputstringYeseach array itemInstructions supplied to the agent for this task.
data[].filesarrayYeseach array itemFiles associated with this resource; each item is described below.
data[].files[]object · extra fields rejectedYeseach array itemReference to an existing regular workspace file checked before execution.
data[].files[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data[].files[].sha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemLowercase hexadecimal SHA-256 digest of the file bytes.
data[].statusstring · values: "queued" | "running" | "completed" | "failed" | "stopped" | "reverting" | "reverted"Yeseach array itemCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data[].stopRequestedbooleanYeseach array itemWhether a client has requested that the native task stop.
data[].outputstringNoeach array itemFinal agent output when available. Content retention may erase this field.
data[].errorobject · extra fields rejectedNoeach array itemExecution failure or transient runtime availability diagnostic. While status is running, platform_runtime_unavailable means observation or preparation is blocked; the original task may still be executing. Reuse this Run instead of submitting it again. The diagnostic clears after successful runtime access. Optional timestamped resource samples may be appended asynchronously; these measurements do not establish the timeout cause or OOM.
data[].error.codestringNoeach array itemStable code identifying an execution failure or transient runtime availability diagnostic.
data[].error.messagestringNoeach array itemHuman-readable failure or availability diagnostic; it does not by itself establish that the original task stopped.
data[].fileDiffarrayYeseach array itemManifest of added, modified and deleted regular workspace files. It does not contain file bytes.
data[].fileDiff[]object · extra fields rejectedYeseach array itemRegular workspace file change with before and after content digests.
data[].fileDiff[].pathstringYeseach array itemCanonical absolute path inside /workspace. Protected state, Git metadata and symlinks are not accepted file targets.
data[].fileDiff[].kindstring · values: "added" | "modified" | "deleted"Yeseach array itemWhether the Run added, modified or deleted the regular file.
data[].fileDiff[].beforeSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest before the Run; absent for a newly added file.
data[].fileDiff[].afterSha256string
Validation pattern^[a-f0-9]{64}$
Noeach array itemContent digest after the Run; absent for a deleted file.
data[].fileDiffStatusstring · values: "pending" | "ready" | "failed"Yeseach array itemFile-diff computation state, separate from execution and checkpoint state.
data[].fileDiffErrorstringNoeach array itemDiagnostic text when file-diff computation fails.
data[].checkpointobject · extra fields rejectedYeseach array itemRootFS checkpoint state and identifier, tracked separately from native execution.
data[].checkpoint.statusstring · values: "pending" | "ready" | "failed" | "skipped"Yeseach array itemCurrent resource state; inspect the allowed values and the operation’s lifecycle notes.
data[].checkpoint.snapshotIdstringNoeach array itemSandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork.
data[].checkpoint.errorstringNoeach array itemStructured failure information. Inspect the stable code and retain the request ID for investigation.
data[].createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeseach array itemCreation time as a UTC date-time string.
data[].startedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Noeach array itemExecution start time as a UTC date-time string.
data[].finishedAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Noeach array itemTerminal execution time as a UTC date-time string.
data[].steeringEnabledbooleanYeseach array itemWhether this Run supports native steering during execution.
data[].contentDeletedAtstring · format: date-timeNoeach array itemPlatform content was erased; native history and checkpoints remain until Environment deletion.
Example
Example
{
  "data": [
    {
      "id": "",
      "environmentId": "",
      "sessionId": "",
      "environmentSequence": -9007199254740991,
      "model": "",
      "input": "",
      "files": [
        {
          "path": ""
        }
      ],
      "status": "queued",
      "stopRequested": false,
      "fileDiff": [
        {
          "path": "",
          "kind": "added"
        }
      ],
      "fileDiffStatus": "pending",
      "checkpoint": {
        "status": "pending"
      },
      "createdAt": "2026-10-12T01:00:00Z",
      "steeringEnabled": false
    }
  ]
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}

Rotate the model connection

Update the endpoint and key for subsequent Runs. Active and queued Runs retain their original revision. Keys are never returned in Session reads.

Replace a Session model connection

PUT /v1/environments/{environmentId}/sessions/{sessionId}/connection

Create an immutable connection revision for subsequent Runs. API keys and headers are write-only. Existing Runs retain their original revision; native history remains in the Session.

Authentication: Platform API bearer token

Parameters and headers
FieldType and constraintsRequiredDescription
path: environmentIdstring · min length 1YesEnvironment identifier. It must belong to the caller’s account or Project.
path: sessionIdstring · min length 1YesExisting Session identifier within the named Environment.

Request example

sh
curl -X PUT \
    "https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/sessions/$SESSION_ID/connection" \
    -H "Authorization: Bearer $SANDPI_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
  "baseUrl": "https://example.com/repository.git",
  "apiKey": "example"
}'
Request body · required application/json
FieldType and constraintsRequiredDescription
baseUrlstring · format: uri; max length 2048YesNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
apiKeystring · min length 1; max length 8192; write onlyYesYour provider or gateway credential. Encrypted at rest, never returned by the API.
headersobject · max 32 keys; write onlyNoAdditional native HTTP headers. Stored with the encrypted credential.
headers.{key}string · max length 8192Noadditional keys—
apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"NoPi native API adapter. Required for Pi; other Harnesses use their native API.
contextWindowinteger · ≥ 1024; ≤ 10000000NoPi custom model context capacity; defaults to 128000.
maxOutputTokensinteger · ≥ 1; ≤ 1000000NoPi custom model output capacity; defaults to 16384.
Example
Example
{
  "baseUrl": "https://example.com/repository.git",
  "apiKey": "example"
}

Responses

200 Successful response.
Response body application/json
FieldType and constraintsRequiredDescription
dataobject · extra fields rejectedYesPersistent native Harness conversation. Configure your own provider or gateway; Sandpi charges only Sandbox runtime.
data.idstringYeswithin dataResource identifier used to read or manage this resource.
data.environmentIdstringYeswithin dataEnvironment identifier. It must belong to the caller’s account or Project.
data.harnessstring · values: "codex" | "claude-code" | "pi" | "kimi-code" | "zcode"Yeswithin dataNative coding-agent program used by the Session.
data.providerstring · values: "openai" | "anthropic" | "kimi" | "zai" | "deepseek"Yeswithin dataNative model family associated with this Harness; not a Sandpi Token supplier.
data.nativeSessionIdstringNowithin dataNative harness conversation identifier retained for Session resume.
data.nativeHistoryStatestring · values: "new" | "available" | "unavailable"Yeswithin dataState of the Session’s native conversation history.
data.createdAtstring · format: date-time
Validation pattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Yeswithin dataCreation time as a UTC date-time string.
data.connectionobject · extra fields rejectedNowithin data—
data.connection.baseUrlstring · format: uri; max length 2048Yeswithin dataNative model API base URL, including its required path prefix. Harness connects directly; Sandpi does not translate model traffic.
data.connection.apistring · values: "openai-responses" | "openai-completions" | "anthropic-messages"Nowithin dataPi native API adapter. Required for Pi; other Harnesses use their native API.
data.connection.revisioninteger · ≥ 1Yeswithin dataImmutable connection revision captured by new Runs. Rotation does not change an existing Run.
Example
Example
{
  "data": {
    "id": "",
    "environmentId": "",
    "harness": "codex",
    "provider": "openai",
    "nativeHistoryState": "new",
    "createdAt": "2026-10-12T01:00:00Z"
  }
}
Error responses
400 Invalid request.

application/json

401 Missing or invalid Platform API token.

application/json

404 Resource not found or outside token scope.

application/json

default Sandpi error.
Error body application/json

Standard error envelope containing a stable code, diagnostic message and request identity.

FieldType and constraintsRequiredDescription
errorobject · extra fields rejectedYesStructured failure information. Inspect the stable code and retain the request ID for investigation.
error.codestringYeswithin errorStable error code used to distinguish failures programmatically.
error.messagestringYeswithin errorHuman-readable diagnostic text.
error.requestIdstringYeswithin errorRequest identifier for correlating diagnostics and support investigations.
error.detailsanyNowithin errorOptional structured error context. Its shape is specific to the service failure.
error.loginUrlstringNowithin errorAuthentication URL supplied when a browser login is required.
error.registrationOpenbooleanNowithin errorWhether new account registration is enabled for this deployment.
Example
Example
{
  "error": {
    "code": "platform_balance_insufficient",
    "message": "Top up Platform credits before submitting a Run.",
    "requestId": "req_example"
  }
}