Sandbox Custom
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST |
List all sandbox custom images
API for custom sandbox base images, built on top of the VM sandbox base via an image-builder agent.
Custom images only run on the Modal VM runtime, so every action is gated on the
tasks-modal-vm-sandbox flag (org-enabled with user_created in its origin_products payload).
Required API key scopes
task:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /sandbox_custom_imagesExample response
Status 200
Create sandbox custom images
Create a draft custom image and start its interactive image-builder agent task. The returned builder_task_id points at the conversation.
Required API key scopes
task:writeRequest parameters
- namestring
- descriptionstringDefault:
- repositorystringnull
- privatebooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /sandbox_custom_imagesExample response
Status 201
Retrieve sandbox custom images
API for custom sandbox base images, built on top of the VM sandbox base via an image-builder agent.
Custom images only run on the Modal VM runtime, so every action is gated on the
tasks-modal-vm-sandbox flag (org-enabled with user_created in its origin_products payload).
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /sandbox_custom_images /:idExample response
Status 200
Update sandbox custom images
Rename or update the description of a custom image. Only mutable metadata (name, description) is editable; the build spec and status are managed by the build flow.
Required API key scopes
task:writePath parameters
- idstring
Request parameters
- namestring
- descriptionstring
Response
Example request
PATCH /api /projects /:project_id /sandbox_custom_images /:idExample response
Status 200
Delete sandbox custom images
API for custom sandbox base images, built on top of the VM sandbox base via an image-builder agent.
Custom images only run on the Modal VM runtime, so every action is gated on the
tasks-modal-vm-sandbox flag (org-enabled with user_created in its origin_products payload).
Required API key scopes
task:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /sandbox_custom_images /:idExample response
Status 204 No response body
Create sandbox custom images build
Persist the image spec (from the request body or the builder agent's sandbox), run the security scan, and on pass build and publish the image.
Required API key scopes
task:writePath parameters
- idstring
Request parameters
- spec_yamlstringnull
Response
Example request
POST /api /projects /:project_id /sandbox_custom_images /:id /buildExample response
Status 200
Create sandbox custom images builder task
Revive (or reuse) the image's builder agent session. When the previous session has ended, a fresh one is started seeded with the stored spec — use this to update an existing image.
Required API key scopes
task:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /sandbox_custom_images /:id /builder_task