Browse Documentation

Reference / sandboxes / generated

POST/v1/sandboxes

Create a persistent running sandbox.

Creates one provider-backed sandbox and registers its opaque project-scoped ID. Provider access comes from a connected profile or an inline header override, and the selected provider remains fixed for this sandbox.

Operation IDcreateSandbox
Success200 / 201
AuthenticationBearer key

Optional provider context

These headers are inline overrides. Connected project profiles keep the same fields outside individual requests.

createSandbox header parameters
NameTypeRequirementMeaning
X-Provider-WorkspacestringOptionalOptional inline provider workspace override. Required with an inline Blaxel credential and omitted when using a connected profile.
Idempotency-KeystringOptionalCaller-generated logical operation key. Reusing it with the same request replays a completed create; conflicting, concurrent, or indeterminate attempts fail closed.
X-Provider-Bridge-UrlstringOptionalOptional inline customer-owned bridge URL. Required with an inline Cloudflare, Modal, or AgentCore credential and omitted when using a connected profile.
X-Provider-Team-IdstringOptionalOptional inline Vercel team identifier. Required with an inline Vercel credential.
X-Provider-Project-IdstringOptionalOptional inline Vercel project identifier. Required with an inline Vercel credential.

Request and response

ResponseSandbox

HTTP example

This credential-safe request and its representative success response are generated with the operation contract. Replace placeholder IDs and read secrets from your environment.

Request

terminal
curl --fail-with-body --request POST \  "$WILDFLOWER_URL/v1/sandboxes" \  -H "Authorization: Bearer $WILDFLOWER_API_KEY" \  -H "Idempotency-Key: docs-create-example" \  -H "Content-Type: application/json" \  --data '{"provider":"e2b","image":"base","timeout":300}'

Response / 201

201.json
{  "id": "wf_e2b_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",  "provider": "e2b",  "status": "creating",  "metadata": {    "nativeProviderId": "native-1"  }}

SDK examples

Use the same operation through any generated client. Each snippet comes from the SDK generator rather than a hand-copied website example.

TypeScriptexample.ts
example.ts
import { Wildflower } from "@wildflowercomputer/sdk";const client = new Wildflower({  wildflowerApiKey: process.env.WILDFLOWER_API_KEY,});const sandbox = await client.sandboxes.create({  provider: "e2b",  image: "base",  timeout: 300,});console.log(sandbox.id, sandbox.status);
Pythonexample.py
example.py
import osfrom wildflower import (    E2bCreateSandboxInput,    ReadFileInput,    RunCommandInput,    WriteFileInput,    Wildflower,)client = Wildflower(    wildflower_api_key=os.environ.get("WILDFLOWER_API_KEY"),)sandbox = client.sandboxes.create(    E2bCreateSandboxInput(image="base", timeout=300))print(sandbox.id, sandbox.status)
Rustexample.rs
example.rs
use wildflower::{    CreateSandboxInput, FileEncoding, ListSandboxesOptions, ReadFileInput,    RunCommandInput, WriteFileInput,    Wildflower,};let client = Wildflower::new(std::env::var("WILDFLOWER_API_KEY")?)?;let sandbox = client.sandboxes().create(CreateSandboxInput::E2b {    api_key: None,    image: Some("base".to_owned()),    timeout: Some(300),}).await?;println!("{} {:?}", sandbox.id, sandbox.status);
Goexample.go
example.go
client, err := wildflower.NewClient(os.Getenv("WILDFLOWER_API_KEY"))if err != nil {    return err}image := "base"timeout := uint32(300)sandbox, err := client.Sandboxes.Create(ctx, wildflower.E2BCreateSandboxInput{    Image: &image,    Timeout: &timeout,})if err != nil {    return err}fmt.Println(sandbox.ID, sandbox.Status)
Zigexample.zig
example.zig
var client = try Wildflower.init(    allocator,    wildflower_api_key,    transport,);defer client.deinit();var sandbox = try client.create(.{ .e2b = .{    .api_key = null,    .image = "base",    .timeout = 300,} });defer sandbox.deinit();std.debug.print("{s}\n", .{sandbox.value.id});

Generated SDK methods

Every name below comes from the generator mapping for this operation, so a language-specific rename creates website drift.