---
title: "Create and run a container sandbox"
method: POST
path: "/v1/stacks/create-and-run"
tags: ["Stacks"]
---

# Create and run a container sandbox

`POST /v1/stacks/create-and-run`

Create a simple container sandbox with a custom image and command

## Request body

- object
  - `image` string, required — Docker image to use
  - `command` string[], required — Command to run
  - `ttl_seconds` number — Time to live in seconds
  - `wait` boolean — Wait for container to be ready

## Response `201`

Container created successfully

- object
  - `id` string, required
  - `status` string, required
  - `image` string, required
  - `command` string[], required

## Other responses

- `400` — Bad request

## Changes

- **2025-10-29** `17a1ccb59fba` — 1 info
  - api operation id `create_and_run` was added
- **2025-10-29** `1a4801fc49a1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/benchify/apis/benchify-api/changes/v1/stacks/create-and-run/post.md)

---

[API](https://skmtc.dev/benchify/apis/benchify-api.md) · [All operations](https://skmtc.dev/benchify/apis/benchify-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/benchify/benchify-api/revisions/1a65aea8dd7d/schema)
