Quickstart
In ten minutes you’ll create a workspace for a customer, give it an agent, and start a run, all from your backend with an API key.
- 1API keyA Sandbox key from the Console
- 2ModelConnect a provider, pick a default
- 3WorkspaceOne per customer of yours
- 4AgentInstructions and a model
- 5RunStart it, read its events
You need your Zupflow API URL and access to the Console. Every example uses $ZUPFLOW_URL for the API URL.
-
Create a Sandbox API key. In the Console, open Developers → API keys and create a key for Sandbox. Copy the secret now: it’s shown once. Sandbox keys start with
zf_test_. -
Give Sandbox a model. Under Developers → Model providers, connect a provider with your own key (OpenAI, Anthropic or OpenRouter), add one of its models and make it Sandbox’s default. Agents without a model of their own use it.
-
Create a workspace for a customer, with your own ID for them as
external_id.import { createClient, createHttpTransport } from "@zupflow/sdk";const zupflow = createClient(createHttpTransport({baseUrl: process.env.ZUPFLOW_URL!,getToken: async () => process.env.ZUPFLOW_API_KEY!,}),);const workspace = await zupflow.workspaces.create(organizationId, {name: "Acme Corp",slug: "acme",environment: "sandbox",external_id: "cus_1042",});Terminal window curl -X POST $ZUPFLOW_URL/v1/organizations/$ORG/workspaces \-H "Authorization: Bearer $ZUPFLOW_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: $(uuidgen)" \-d '{"name":"Acme Corp","slug":"acme","environment":"sandbox","external_id":"cus_1042"}' -
Create an agent in that workspace.
const agent = await zupflow.agents.create(workspace.id, {name: "Planner",description: "Plans the team's week.",instructions: "You help the team plan their week. Be brief.",model_id: null, // Sandbox's default model});Terminal window curl -X POST $ZUPFLOW_URL/v1/workspaces/$WS/agents \-H "Authorization: Bearer $ZUPFLOW_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: $(uuidgen)" \-d '{"name":"Planner","description":"Plans the team'"'"'s week.","instructions":"You help the team plan their week. Be brief.","model_id":null}' -
Start a run and read what happened.
const run = await zupflow.runs.create(workspace.id, agent.id, { input: "Hello" });// Later, or when the run.completed webhook arrives:const events = await zupflow.runs.events(workspace.id, run.id);const done = await zupflow.runs.get(workspace.id, run.id);console.log(done.status, done.output);Terminal window curl -X POST $ZUPFLOW_URL/v1/workspaces/$WS/agents/$AGENT/runs \-H "Authorization: Bearer $ZUPFLOW_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: $(uuidgen)" \-d '{"input":"Hello"}'curl $ZUPFLOW_URL/v1/workspaces/$WS/runs/$RUN/events \-H "Authorization: Bearer $ZUPFLOW_API_KEY"You can also watch it in the Console under Runs.
Next steps
Section titled “Next steps”- Give the agent real tools: Build your first agent connects an account, grants tools and handles webhooks.
- Ask a person before sensitive calls: Ask before acting.
- Every endpoint, with examples: API reference.