Do it yourself
Install the SDK, create an API key, and call the API from your backend or your agent's tools.
$ npm install stackmachineOne API key gives your agent hosting, storage, databases, email, and cron.
Example calls from the StackMachine SDK. Try a live deploy
Powering products and agents at
Wire the SDK in yourself, or paste one prompt and let your coding agent handle the integration.
Install the SDK, create an API key, and call the API from your backend or your agent's tools.
$ npm install stackmachineor
Paste one prompt into your coding agent. It creates your account, gets an API key, and wires up the SDK.
Signup for an account & get API key with stackmachine.com/auth.md, then follow docs.stackmachine.com/agent-quickstart to integrate into the codebase
Works withClaude Code, Codex, Cursor
Deploy sites, store files, query data, send emails, and schedule jobs with one client and one API key.
import StackMachine from "stackmachine";
const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
const deployment = await client.deployments.create({
appName: "storefront",
owner: "acme",
files: {
"index.html": "<h1>Open for business</h1>",
},
});
const { app } = await deployment.wait({
onProgress: ({ kind, message }) => console.log(kind, message),
});
console.log(app.url); // https://storefront.stackmachine.appimport StackMachine from "stackmachine";
const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
const volume = await client.apps.volumes.create({
app: "da_XYZ",
mountPath: "/uploads",
maxSizeBytes: 1_073_741_824,
});
// Open the same files to S3-compatible tools.
const updated = await client.apps.volumes.update(volume.id, {
mountPath: "/uploads",
s3Enabled: true,
redeployApp: true,
});
console.log(updated.s3Url, updated.explorerUrl);import StackMachine from "stackmachine";
const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
const { database, password } = await client.apps.databases.create({
app: "da_XYZ",
dbEngine: "POSTGRES", // or "MYSQL", "SQLITE"
name: "orders",
});
// The password is returned once. Store it as a secret,
// then connect with the Postgres driver your app already uses.
console.log(database.host, database.port, database.username);
const rotated = await client.apps.databases.rotateCredentials(database.id);import StackMachine from "stackmachine";
const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
const message = await client.emails.send({
app: "da_XYZ",
to: ["ada@example.com"],
subject: "Your receipt",
textBody: "Thanks for your order.",
htmlBody: "<p>Thanks for your order.</p>",
});
console.log(message.id, message.status);
const sent = await client.emails.sent.list({ app: "da_XYZ", limit: 10 });import StackMachine from "stackmachine";
const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
const cleanup = await client.apps.cronjobs.create({
app: "da_XYZ",
name: "cleanup",
schedule: "0 2 * * *",
execute: { command: "python cleanup.py" },
});
const healthcheck = await client.apps.cronjobs.create({
app: "da_XYZ",
name: "healthcheck",
schedule: "*/5 * * * *",
fetch: { path: "/health", method: "GET" },
});Agents ship in bursts and spend most of their time waiting. Apps start cold in under 5ms, scale to zero between requests, and never bill for the wait.
<5ms
cold start for Node.js and Python apps
Time to start a Python application
Node.js, Python, PHP, and more run as they are. Agents write ordinary server code, with no edge-specific rewrites.
Every app runs in its own WebAssembly sandbox, so untrusted and AI-generated code stays isolated.
Model calls, webhook pauses, and sleeping WebSockets don't count as compute. You pay for CPU work, not wall-clock time.
Deployments
Requests processed monthly
Lower compute cost
Active regions
Everything that comes after the code is written: a URL, storage, a database, email, and scheduled work, all from the same API.
Send a files map, a zip, or a Git repo and get a live URL back. Build logs stream while you wait.
Attach persistent volumes at any mount path. Turn on S3 access when a tool needs the objects directly.
312 MB of 1 GB
Create a Postgres, MySQL, or SQLite database per app. Credentials come back once, ready to store as secrets.
| id | customer | total | status |
|---|---|---|---|
| 1042 | ada@example.com | $128.00 | paid |
| 1041 | lin@example.com | $42.50 | paid |
| 1040 | sam@example.com | $310.00 | refunded |
Send receipts, invites, and notifications without wiring up a provider. Each message reports its delivery status.
Thanks for your order. Your receipt is attached.
Run a command or call an HTTP path on a cron schedule. Pause, reschedule, or delete jobs from the same SDK.
Attach a hostname to any app and get back the DNS records to set. Verify once they propagate.
Describe an app and get a live StackMachine URL back.
Describe what you want to host, or use a quick action below. I'll deploy it on StackMachine and return a live link with a preview.
Run real app runtimes in secure Wasm sandboxes with sub-5ms cold starts and density built for massive scale.
| Feature | StackMachine | AWS Lambda | Cloudflare Workers |
|---|---|---|---|
| Cold start | <5ms | 200ms+ | Varies by language (10-800ms) |
| Code changes required | No | Yes | Yes |
| Node.js support | Yes | Yes | No |
| Next.js support | Yes | Limited | Limited (via vinext fork) |
| Python support | Yes | Yes | Limited (Pyodide) |
| PHP support | Yes | No | No |
| WordPress support | Yes | No | No |
| Go support | Yes | Yes | No |
| Multithreading & multiprocessing | Yes | Yes | No |
| Native realtime / WebSockets | Yes | No | Yes |
| Idle time billed | No | Yes | No |
| Apps per server | Highest density | Lower density | High density |
Short answers to the architecture, security, and workflow questions teams ask before adopting StackMachine.
One API key for hosting, storage, databases, email, and cron.