Getting started

Quickstart

From no account to a model answer and a finished swarm in about five minutes.

  1. 1

    Create an API key

    Sign in and open Models → API keys. Name the key and copy it: it is shown once. Keys start with sk-.

  2. 2

    Add credits

    Both APIs draw on your workspace's prepaid credits. Add some under Billing. A request that your balance can't cover is refused with a 402 before anything is spent.

  3. 3

    Save the key in your shell

    Terminal
    export API_KEY="sk-..."

Call a model

The Model API speaks the OpenAI Chat Completions format, so any OpenAI client works with a different base URL.

curl https://swarmcomputers.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "max_tokens": 2000,
    "messages": [{"role": "user", "content": "Explain SSRF in two sentences."}]
  }'

Start a swarm

Send a task, a size and a budget. The swarm plans the work, starts agents and stops on its own when it is done or the budget is used. You are never billed above budget_usd.

curl https://swarmcomputers.com/v1/swarms \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "Compare the five most popular open-source vector databases: licence, hosting options, pricing, and one paragraph on when to pick each.",
    "size": "small",
    "budget_usd": 5
  }'

The response comes back at once with status: "planning". A small swarm usually finishes in 10–20 min. To watch it live instead of polling, stream its events. To see the plan and estimate before anything runs, send "plan_only": true.

Agents start offline

A new workspace’s agents work from what the model knows and what you give them. To let them reach sites, list your verified domains in allow_domains, or ask us to switch on open-web browsing for your account. See what agents can reach.

Next