SHIP AI Sandboxes API
The sandboxes API from SHIP AI — 6 operation(s) for sandboxes.
Operations 6
GET
/sandboxes/{sandboxId}/logs
Fetch a session's log content: agent stream-json (session), container stdout…
#
The sandboxes API from SHIP AI — 6 operation(s) for sandboxes.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/letsship-ai:letsship-ai-sandboxes-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SHIP Sandboxes API
version: v1
description: 'The SHIP product API: start and steer missions, and manage the projects, credentials and agents they run with.'
servers:
- url: https://api.letsship.ai/v1
tags:
- name: Sandboxes
paths:
/sandboxes/capacity:
get:
x-audience: public
tags:
- Sandboxes
summary: How many agents the org is running at once against its limit, and which…
description: Each agent runs in its own sandbox, so this counts running agents. Read from the platform's capacity, which is checked every minute. `limit` is how many agents the org runs at once, by its plan or its own agreement; `platformSaturated` means every agent slot on the platform is taken, so even an org under its limit waits.
parameters:
- schema:
type: string
minLength: 1
required: false
name: orgId
in: query
responses:
'200':
description: Capacity
content:
application/json:
schema:
$ref: '#/components/schemas/SandboxCapacityResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such org for the caller
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Capacity not read recently
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getSandboxesCapacity
x-operation-id-source: derived
/sandboxes:
get:
x-audience: public
tags:
- Sandboxes
summary: List sandboxes for the caller's accessible projects
description: 'Each sandbox is one agent run, newest first. Filter by project, status, mission (`issueId`) or agent role. The filters apply before `limit`, so a page holds up to `limit` matching runs. When more runs match, `nextCursor` is set: send it back as `cursor`, with the same filters, for the next page.'
parameters:
- schema:
type: string
required: false
name: projectId
in: query
- schema:
$ref: '#/components/schemas/SandboxStatus'
required: false
name: status
in: query
- schema:
type: string
minLength: 1
description: Only the runs of this mission, by its issue id (for example ENG-42).
required: false
name: issueId
in: query
- schema:
type: string
enum:
- planner
- builder
- reviewer
- qa
description: Only the runs of this agent role.
required: false
name: role
in: query
- schema:
type: integer
minimum: 1
maximum: 500
default: 200
required: false
name: limit
in: query
- schema:
type: string
minLength: 1
description: '`nextCursor` from the previous page, with the same filters. Leave it out for the newest runs.'
required: false
name: cursor
in: query
responses:
'200':
description: Sandboxes
content:
application/json:
schema:
$ref: '#/components/schemas/ListSandboxesResponse'
'400':
description: A cursor this API did not issue
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getSandboxes
x-operation-id-source: derived
/sandboxes/{sandboxId}:
get:
x-audience: public
tags:
- Sandboxes
summary: 'Sandbox detail: registry row + metric series + session logs'
parameters:
- schema:
type: string
minLength: 1
required: true
name: sandboxId
in: path
responses:
'200':
description: Detail
content:
application/json:
schema:
$ref: '#/components/schemas/SandboxDetailResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getSandboxesBySandboxId
x-operation-id-source: derived
/sandboxes/{sandboxId}/logs:
get:
x-audience: public
tags:
- Sandboxes
summary: 'Fetch a session''s log content: agent stream-json (session), container stdout…'
parameters:
- schema:
type: string
minLength: 1
required: true
name: sandboxId
in: path
- schema:
type: string
required: true
name: role
in: query
- schema:
type: string
required: true
name: sessionId
in: query
- schema:
allOf:
- $ref: '#/components/schemas/SandboxLogPart'
- default: session
required: false
name: part
in: query
responses:
'200':
description: Log content
content:
application/json:
schema:
$ref: '#/components/schemas/SandboxLogsResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Log storage not bound
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getSandboxesBySandboxIdLogs
x-operation-id-source: derived
/sandboxes/{sandboxId}/stop:
post:
x-audience: public
tags:
- Sandboxes
summary: Stop the agent in a sandbox
description: Ends the run before it finishes. Its work in progress is lost, and its status becomes `stopped`. The platform stops the sandbox a few seconds after this call, so read the sandbox again to see the new status. Only an org admin can stop a sandbox.
parameters:
- schema:
type: string
minLength: 1
required: true
name: sandboxId
in: path
responses:
'200':
description: Stop requested
content:
application/json:
schema:
$ref: '#/components/schemas/StopSandboxResponse'
'403':
description: Role insufficient
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postSandboxesBySandboxIdStop
x-operation-id-source: derived
/sandboxes/{sandboxId}/events:
get:
x-audience: public
tags:
- Sandboxes
summary: Follow the live events of one agent run
description: Server-sent events. The stream starts with `state`, then sends the recent events of the agent and each new event as the agent emits it. It ends with `end` when the run ends, when the mission of the run moves to another stage, or after `maxSeconds`. A comment line comes at least every 15 seconds while the stream is quiet. To continue after an end, open the stream again with the last `id` as `since`. A reconnect with a `Last-Event-ID` header to a run that ended gets 204, which tells an EventSource to stop.
parameters:
- schema:
type: string
minLength: 1
required: true
name: sandboxId
in: path
- schema:
type:
- integer
- 'null'
minimum: 0
description: The `id` of the last event that you have. The stream sends the events after it, at most the newest 800. Ids count up by one, so a jump shows that older events were left out. Without a cursor, the stream starts with the last 20 events of the run. A `Last-Event-ID` header has the same effect.
required: false
name: since
in: query
- schema:
type: integer
minimum: 1
maximum: 600
default: 300
description: The longest time that the stream stays open, in seconds (default 300, at most 600). At that time the stream sends `end` with the reason `time_cap`.
required: false
name: maxSeconds
in: query
responses:
'200':
description: The event stream. Each frame matches `SandboxEvent`.
content:
text/event-stream:
schema:
$ref: '#/components/schemas/SandboxEvent'
'204':
description: 'A reconnect with `Last-Event-ID` to a run that ended: nothing more comes.'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getSandboxesBySandboxIdEvents
x-operation-id-source: derived
components:
schemas:
SandboxEventEnd:
type: object
properties:
reason:
$ref: '#/components/schemas/SandboxEventEndReason'
status:
$ref: '#/components/schemas/SandboxStatus'
stage:
type:
- string
- 'null'
enum:
- pending
- supervisor
- planning
- coding
- ci
- review
- deploying
- qa
- done
- declined
- needs_attention
required:
- reason
- status
- stage
description: The last event of a stream, with the status of the run and the stage of its mission at that time.
SandboxLogPart:
type: string
enum:
- session
- system
- prompt
ListSandboxesResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SandboxInstance'
nextCursor:
type:
- string
- 'null'
required:
- data
- nextCursor
SandboxEvent:
oneOf:
- type: object
properties:
event:
type: string
enum:
- state
data:
$ref: '#/components/schemas/SandboxEventState'
required:
- event
- data
- type: object
properties:
event:
type: string
enum:
- fragment
id:
type: integer
description: The cursor of the event. Give it as `since` to continue.
data:
$ref: '#/components/schemas/LiveFragment'
required:
- event
- id
- data
- type: object
properties:
event:
type: string
enum:
- end
data:
$ref: '#/components/schemas/SandboxEventEnd'
required:
- event
- data
description: 'One frame of the stream. The SSE `event` field names the type and the `data` field holds the JSON. A `fragment` frame also has an `id` line. Comment lines (`: keepalive`) come at least every 15 seconds.'
SandboxInstance:
type: object
properties:
sandboxId:
type: string
issueId:
type: string
projectId:
type:
- string
- 'null'
role:
type: string
harness:
type:
- string
- 'null'
harnessVersion:
type:
- string
- 'null'
runId:
type:
- string
- 'null'
status:
$ref: '#/components/schemas/SandboxStatus'
terminationReason:
type:
- string
- 'null'
instanceType:
type:
- string
- 'null'
createdAt:
type: integer
timeoutAt:
type:
- integer
- 'null'
lastHeartbeatAt:
type:
- integer
- 'null'
endedAt:
type:
- integer
- 'null'
description: When the run ended, in epoch milliseconds. Null until the run ends.
lastCpuPct:
type:
- number
- 'null'
lastMemUsedMb:
type:
- integer
- 'null'
lastMemTotalMb:
type:
- integer
- 'null'
lastDiskUsedPct:
type:
- number
- 'null'
lastMetricAt:
type:
- integer
- 'null'
required:
- sandboxId
- issueId
- projectId
- role
- harness
- harnessVersion
- runId
- status
- terminationReason
- instanceType
- createdAt
- timeoutAt
- lastHeartbeatAt
- endedAt
- lastCpuPct
- lastMemUsedMb
- lastMemTotalMb
- lastDiskUsedPct
- lastMetricAt
SandboxStatus:
type: string
enum:
- running
- stale
- completed
- stopped
- failed
description: 'How the agent''s run in this sandbox stands. `running`: the agent works now. `completed`: the agent finished its work. `stopped`: something ended the run on purpose before it finished, for example a newer run, a stop of the mission or a person. `failed`: the agent reported a failure, or exited without a report. `stale`: the platform closed the run without a report, after its time limit or after a later attempt replaced it.'
SandboxCapacityResponse:
type: object
properties:
orgId:
type: string
running:
type: integer
minimum: 0
limit:
anyOf:
- type: integer
exclusiveMinimum: 0
- type: 'null'
- type: 'null'
waiting:
type: array
items:
$ref: '#/components/schemas/SandboxCapacityWaiter'
platformSaturated:
type: boolean
capturedAt:
type: integer
required:
- orgId
- running
- limit
- waiting
- platformSaturated
- capturedAt
StopSandboxResponse:
type: object
properties:
ok:
type: boolean
sandboxId:
type: string
required:
- ok
- sandboxId
SandboxMetricSample:
type: object
properties:
t:
type: integer
cpuPct:
type: number
memUsedMb:
type: integer
memTotalMb:
type: integer
diskUsedPct:
type: number
required:
- t
- cpuPct
- memUsedMb
- memTotalMb
- diskUsedPct
SandboxEventState:
type: object
properties:
sandboxId:
type: string
issueId:
type: string
role:
type: string
status:
$ref: '#/components/schemas/SandboxStatus'
stage:
type:
- string
- 'null'
enum:
- pending
- supervisor
- planning
- coding
- ci
- review
- deploying
- qa
- done
- declined
- needs_attention
required:
- sandboxId
- issueId
- role
- status
- stage
description: 'The first event of every stream: the run and its mission as they are when the stream opens. `stage` is the current stage of the mission, or null when the platform has no record of the mission.'
PromptScope:
type: string
enum:
- repo-contributed
- none
- not-attributable
SandboxCapacityWaiter:
type: object
properties:
issueId:
type: string
projectId:
type: string
role:
type: string
reason:
type: string
enum:
- org
- platform
waitedMs:
type: integer
minimum: 0
required:
- issueId
- projectId
- role
- reason
- waitedMs
SandboxEventEndReason:
type: string
enum:
- run_ended
- stage_changed
- time_cap
description: 'Why the stream ended. `run_ended`: the run is no longer `running`. `stage_changed`: the mission moved to another stage while the run was still active. `time_cap`: the stream was open for `maxSeconds`. Open the stream again with `since` to continue.'
SandboxLogsResponse:
type: object
properties:
sandboxId:
type: string
role:
type: string
sessionId:
type: string
part:
$ref: '#/components/schemas/SandboxLogPart'
content:
type: string
bytes:
type: integer
promptScope:
$ref: '#/components/schemas/PromptScope'
promptSpans:
type: array
items:
$ref: '#/components/schemas/PromptSpan'
required:
- sandboxId
- role
- sessionId
- part
- content
- bytes
PromptSpan:
type: object
properties:
id:
type:
- string
- 'null'
content:
type: string
kind:
type: string
enum:
- repo-conventions
- repo-role-prompt
- mission-extension
- mission-override
- unattributed
required:
- id
- content
- kind
LiveFragment:
type: object
properties:
kind:
type: string
enum:
- thought
- action
- plan
- error
t:
type: integer
body:
type: string
action:
type: string
parameter:
type: string
result:
type: string
toolUseId:
type: string
items:
type: array
items:
type: object
properties:
content:
type: string
status:
type: string
required:
- content
- status
required:
- kind
- t
Error:
type: object
properties:
category:
type: string
enum:
- auth
- rate_limit
- timeout
- validation
- infrastructure
- agent
- unknown
example: validation
title:
type: string
example: Invalid request
description:
type: string
example: The 'projectId' parameter must be a UUID.
retryable:
type: boolean
example: false
code:
type: string
example: credits_exhausted
required:
- category
- title
- description
- retryable
SandboxDetailResponse:
type: object
properties:
sandbox:
$ref: '#/components/schemas/SandboxInstance'
runSessionId:
type:
- string
- 'null'
description: The session that this run recorded when it started. `sessions` lists every session of this role on the mission, with this one first once its log is saved. Null for a run that recorded none.
metrics:
type: array
items:
$ref: '#/components/schemas/SandboxMetricSample'
sessions:
type: array
items:
$ref: '#/components/schemas/SandboxSession'
liveFragments:
type: array
items:
$ref: '#/components/schemas/LiveFragment'
required:
- sandbox
- metrics
- sessions
- liveFragments
SandboxSession:
type: object
properties:
role:
type: string
sessionId:
type: string
ts:
type: string
outcome:
type:
- string
- 'null'
logKey:
type:
- string
- 'null'
systemKey:
type:
- string
- 'null'
totalCostUsd:
type:
- number
- 'null'
required:
- role
- sessionId
- ts
- outcome
- logKey
- systemKey
- totalCostUsd
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: API token (pat_ or mcp_ prefix)