Separate a proposed action from permission to run it
A model can propose a calculation or transformation. Your application decides which code is authorized, submits a bounded job and checks the result. Treat the model response as input, not authority. A useful execution API records actual outcome and makes a failed or cancelled attempt visible.
cpuOS currently runs short Python and JavaScript jobs on your Docker worker. Each container has resource and time limits and no job network. It does not offer a separate guest kernel, browser sessions, file transfer or persistent processes.
The supported job workflow
Create a workspace, connect a Node 24 + Docker worker and submit a Python or Node job. Poll its state and inspect the terminal result. stdout and stderr are returned after execution; they are not streamed live.
const response = await fetch("https://cpuos.si/v1/jobs", { method: "POST", headers: { Authorization: "Bearer " + process.env.CPUOS_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify({ template: "python", code: "print(sum([12, 18, 25]))", vcpu: 1, memoryMb: 512, timeoutSeconds: 30, }),})if (!response.ok) throw new Error(await response.text())const job = await response.json()// GET /v1/jobs/:id until status is completed, failed or cancelled.// Use the result only after checking status and exitCode.Validate a representative task
- Verify a successful script and a nonzero exit code with known expected output.
- Test timeout, output truncation, queued cancellation and running cancellation.
- Disconnect the worker and inspect stale status and failure handling before retrying.
- Confirm that code and logs contain no long-lived credentials or unnecessary customer data.
Keep reasoning and execution separate
gpuOS supplies open-model inference on your GPUs. Your application validates tool arguments, sets fixed limits and submits authorized jobs to cpuOS. There is no automatic built-in tool connection between the products.
See LangChain tool wiring and n8n HTTP jobs for the same contract in an application workflow.