Check a coding task.
Run a proposed change against your project’s checks in a dedicated environment. Collect the diff and test output for review.
Serverless / Agent sandboxes
Give AI agents an isolated execution environment for Python code, data analysis and GPU tasks. Run the work, collect the result and bring it back into your application.
Join the Serverless waitlistAccess is opening gradually. Runtime and GPU availability are confirmed during onboarding.
“Run this analysis on the sample.”
analyze.pyload → execute → collectBring a concrete workload to onboarding. Start with a representative input and a clear definition of success.
Run a proposed change against your project’s checks in a dedicated environment. Collect the diff and test output for review.
Prepare a Python job that cleans data, computes a summary or creates an artifact. Keep inputs and outputs explicit.
Bring workloads that need GPU compute, such as model inference or data processing. Size the runtime and memory with the team.
Prepare the workload
Keep the task separate from the agent that requested it. Define the input, pin its dependencies and decide what a successful output looks like.
def summarize(rows):
values = [float(row["amount"]) for row in rows]
return {
"count": len(values),
"total": round(sum(values), 2),
}
# A small, representative input for local testing.
print(summarize([
{"amount": "12.50"},
{"amount": "7.50"},
]))
# Expected: {"count": 2, "total": 20.0}This function runs locally with Python. It illustrates an input/output contract, not the Serverless SDK or a sandbox security boundary. Deployment setup is provided during onboarding.
Agree these settings with the team before connecting agent-generated work to production.
Python runtime, pinned packages, input files and model weights. Specify GPU memory if the job needs it.
Required network destinations, data and secrets. Decide how each task gets only the access it needs.
Timeout, memory budget and concurrency. Define retry behaviour so a repeated job does not duplicate work.
Logs, files and exit status. Confirm how to retrieve them, how long to keep them and when to clean up.
A different starting point / Open Models
For a model-led calculation, Open Models has a built-in code interpreter. Declare the tool and let Blade manage its execution loop.
Requires code interpreter access on your account and a model with native tool calling. This is a managed tool, separate from deploying your own Serverless environment.
Read the tool-calling referenceimport os
from openai import OpenAI
client = OpenAI(
base_url="https://api.models.blade.sh/v1",
api_key=os.environ["BLADE_API_KEY"],
)
reply = client.chat.completions.create(
model=os.environ["BLADE_MODEL"],
messages=[{
"role": "user",
"content": "Use Python to find the median of 10, 12, 98.",
}],
extra_body={
"tools": [{"type": "code_interpreter"}],
},
)
print(reply.choices[0].message.content)Install openai and set BLADE_API_KEY and BLADE_MODEL. Select a tool-capable model with access to code execution.
Serverless access is opening gradually. Join the waitlist with your workload. Runtime setup, available GPU classes and deployment controls are provided during onboarding.
No. A model proposes code or a tool call. The execution environment runs the allowed task. Your application or agent orchestrates the steps and reviews the result.
Bring the framework, dependency list and commands you want to run. Compatibility and required permissions are checked during onboarding; this page does not imply a preconfigured Claude, Codex or Hermes integration.
GPU classes, scaling settings and commercial terms are confirmed with your Serverless access. Open Models token rates and dynamic pricing are not a quote for a custom sandbox workload.