Skip to main content
POST
/
io.pocketenv.sandbox.createSandbox
Create a sandbox
curl --request POST \
  --url https://api.pocketenv.io/xrpc/io.pocketenv.sandbox.createSandbox \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "base": "<string>",
  "name": "<string>",
  "description": "<string>",
  "provider": "<string>",
  "topics": [
    "<string>"
  ],
  "repo": "<string>",
  "vcpus": 2,
  "memory": 2,
  "disk": 4,
  "readme": "<string>",
  "secrets": "<unknown>",
  "envs": "<unknown>",
  "keepAlive": true,
  "spriteToken": "<string>",
  "redactedSpriteToken": "<string>",
  "denoDeployToken": "<string>",
  "redactedDenoDeployToken": "<string>",
  "daytonaApiKey": "<string>",
  "redactedDaytonaApiKey": "<string>",
  "daytonaOrganizationId": "<string>",
  "vercelApiToken": "<string>",
  "redactedVercelApiToken": "<string>",
  "vercelProjectId": "<string>",
  "vercelTeamId": "<string>",
  "modalTokenId": "<string>",
  "redactedModalTokenId": "<string>",
  "modalTokenSecret": "<string>",
  "redactedModalTokenSecret": "<string>",
  "e2bApiKey": "<string>",
  "redactedE2bApiKey": "<string>",
  "hopxApiKey": "<string>",
  "redactedHopxApiKey": "<string>",
  "runloopApiKey": "<string>",
  "redactedRunloopApiKey": "<string>"
}
'
{
  "name": "<string>",
  "provider": "<string>",
  "description": "<string>",
  "website": "<string>",
  "logo": "<string>",
  "topics": [
    "<string>"
  ],
  "repo": "<string>",
  "readme": "<string>",
  "vcpus": 123,
  "memory": 123,
  "disk": 123,
  "ports": [
    33280
  ],
  "installs": 123,
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
base
string
required

The base sandbox URI to clone from, e.g. a template or an existing sandbox.

name
string

The name of the sandbox

Minimum string length: 1
description
string

A description for the sandbox

provider
string

The provider to create the sandbox on, e.g. 'daytona', 'vercel', 'cloudflare', etc.

topics
string[]
Maximum string length: 50
repo
string

A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.

vcpus
integer
Required range: x >= 1
memory
integer
Required range: x >= 1
disk
integer
Required range: x >= 3
readme
string<uri>

A URI to a README for the sandbox.

secrets
any
envs
any
keepAlive
boolean

Prevent the sandbox from being automatically stop after a period of inactivity. Use with caution, as this may lead to increased costs.

spriteToken
string

A token (encrypted) for accessing sprite resources

redactedSpriteToken
string

A redacted token for accessing sprite resources

denoDeployToken
string

A token (encrypted) for accessing Deno Deploy resources

redactedDenoDeployToken
string

A redacted token for accessing Deno Deploy resources

daytonaApiKey
string

A token (encrypted) for accessing Daytona resources

redactedDaytonaApiKey
string

A redacted token for accessing Daytona resources

daytonaOrganizationId
string

The organization ID for Daytona resources

vercelApiToken
string

A token (encrypted) for accessing Vercel resources

redactedVercelApiToken
string

A redacted token for accessing Vercel resources

vercelProjectId
string

The project ID for Vercel resources

vercelTeamId
string

The team ID for Vercel resources

modalTokenId
string

A token (encrypted) for accessing Modal resources

redactedModalTokenId
string

A redacted token for accessing Modal resources

modalTokenSecret
string

A token (encrypted) for accessing Modal resources

redactedModalTokenSecret
string

A redacted token for accessing Modal resources

e2bApiKey
string

An API KEY (encrypted) for accessing E2B resources

redactedE2bApiKey
string

A redacted API KEY for accessing E2B resources

hopxApiKey
string

An API KEY (encrypted) for accessing hopx resources

redactedHopxApiKey
string

A redacted API KEY for accessing hopx resources

runloopApiKey
string

An API KEY (encrypted) for accessing Runloop resources

redactedRunloopApiKey
string

A redacted API KEY for accessing Runloop resources

Response

OK

name
string

Name of the sandbox

Maximum string length: 50
provider
string

The provider of the sandbox, e.g. 'daytona', 'vercel', 'cloudflare', etc.

Maximum string length: 50
description
string
Maximum string length: 3000
website
string<uri>

Any URI related to the sandbox

URI to an image logo for the sandbox

topics
string[]
Maximum array length: 50
Required string length: 1 - 50
repo
string

A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.

readme
string<uri>

A URI to a README for the sandbox.

vcpus
integer
memory
integer
disk
integer
ports
integer[]
Maximum array length: 100
Required range: 1025 <= x <= 65535
installs
integer
createdAt
string<date-time>