> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates quickstart

> Launch a curated template, then author and ship your own.

Two paths. Launching a curated template is one API call on any paid plan. Authoring your own takes a few minutes and a Scale plan. We'll do both.

```bash theme={null}
export ORGO_API_KEY=sk_live_...
```

## Launch a curated template

The fastest way to see templates in action: launch a computer from one Orgo maintains. Pass its `ref` as `template_ref` to [Create computer](/api-reference/computers/create) — the VM restores from the prebuilt golden snapshot with everything already installed.

Curated templates live in the `system` namespace. The current catalog is `system/claude-code@1.0.0`, `system/openclaw@1.0.0`, and `system/hermes-agent@1.0.0`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://www.orgo.ai/api/computers \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "claude-1",
      "template_ref": "system/claude-code@1.0.0"
    }'
  ```

  ```python Python theme={null}
  import os, requests

  r = requests.post(
      "https://www.orgo.ai/api/computers",
      headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
      json={
          "workspace_id": workspace_id,
          "name": "claude-1",
          "template_ref": "system/claude-code@1.0.0",
      },
  )
  computer = r.json()
  print(computer["id"], computer["status"])
  ```

  ```javascript JavaScript theme={null}
  const r = await fetch("https://www.orgo.ai/api/computers", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.ORGO_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      workspace_id: workspaceId,
      name: "claude-1",
      template_ref: "system/claude-code@1.0.0",
    }),
  });
  const computer = await r.json();
  console.log(computer.id, computer.status);
  ```
</CodeGroup>

That's it — the computer boots with Claude Code already installed and waiting in the terminal. Browse the full catalog with [List curated templates](/api-reference/templates/list-curated).

<Tip>
  Hardware in the request overrides the template's defaults. Add `"ram": 8, "cpu": 4` to launch the same template on a bigger box.
</Tip>

***

## Author your own

Now build a template from scratch. We'll recreate a minimal Claude Code environment so you can see every step. It publishes to your own `default` namespace as `default/claude-code@1.0.0` — your private template, separate from the curated `system/claude-code@1.0.0` above.

<Note>
  Publishing and building require a [Scale plan](https://orgo.ai/pricing). Launching what you build counts against your normal computer quota.
</Note>

<Steps>
  <Step title="Write the template">
    Save this as `claude-code.yaml`. It declares the hardware, an optional secret, a build-time install, and the terminal session the browser attaches to.

    ```yaml claude-code.yaml theme={null}
    api_version: orgo.ai/v1

    template:
      name: claude-code
      version: 1.0.0
      description: Claude Code CLI, ready in the terminal.

    hardware:
      cpu: 2
      ram_gb: 4
      resolution: 1280x720x24

    # The launching user supplies this from their vault; injected at create time.
    secrets:
      - name: anthropic_api_key
        description: Anthropic API key, used by Claude Code when set.
        optional: true

    # Baked into the golden snapshot at build time.
    apps:
      - name: claude-code
        title: Claude Code
        install: |
          curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
          apt-get install -y nodejs
          npm install -g @anthropic-ai/claude-code

    # The tmux session the browser terminal attaches to by name.
    terminal:
      - name: claude-code
        cwd: /root
    ```
  </Step>

  <Step title="Validate it">
    Catch mistakes before publishing. [Validate](/api-reference/templates/validate) has no side effects.

    ```bash theme={null}
    curl -X POST https://www.orgo.ai/api/templates/validate \
      -H "Authorization: Bearer $ORGO_API_KEY" \
      -H "Content-Type: application/yaml" \
      --data-binary @claude-code.yaml
    ```

    A clean template returns `{ "ok": true, "template": { ... } }`. Otherwise you get a list of `errors`, each with the exact `field` and a `message`.
  </Step>

  <Step title="Publish and build">
    [Publish](/api-reference/templates/publish) with `?auto_build=true` to register the ref and start baking the golden snapshot in one call.

    ```bash theme={null}
    curl -X POST "https://www.orgo.ai/api/templates?auto_build=true" \
      -H "Authorization: Bearer $ORGO_API_KEY" \
      -H "Content-Type: application/yaml" \
      --data-binary @claude-code.yaml
    ```

    ```json theme={null}
    {
      "ref": "default/claude-code@1.0.0",
      "digest": "a1b2c3d4e5f6...",
      "published": "2026-06-08T17:00:00Z",
      "auto_build": "building"
    }
    ```
  </Step>

  <Step title="Watch the build">
    A build takes about two minutes. Stream the log live, or poll until `ready`.

    <CodeGroup>
      ```bash Stream (SSE) theme={null}
      curl -N https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build/events \
        -H "Authorization: Bearer $ORGO_API_KEY"
      ```

      ```bash Poll theme={null}
      curl https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build \
        -H "Authorization: Bearer $ORGO_API_KEY"
      # -> {"status": "building"}  ...  {"status": "ready"}
      ```
    </CodeGroup>
  </Step>

  <Step title="Launch a computer from it">
    Once the build is `ready`, create a computer with your `template_ref`.

    ```bash theme={null}
    curl -X POST https://www.orgo.ai/api/computers \
      -H "Authorization: Bearer $ORGO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "claude-dev",
        "template_ref": "default/claude-code@1.0.0"
      }'
    ```

    The computer restores from the golden snapshot — Node and Claude Code already installed, your terminal session ready. Poll `https://www.orgo.ai/api/desktops/{instance_id}/proxy/health` until it returns `200`, then connect. See [Create computer](/api-reference/computers/create) for the full response and connection details.
  </Step>
</Steps>

## Iterate

Refs are immutable, so you have two ways to ship a change:

* **Bump the version** — `1.0.0` → `1.0.1`. The clean path for anything you've shared.
* **Force-replace** — re-publish the same version with [`?force=true`](/api-reference/templates/publish) while you're still iterating locally.

```bash theme={null}
curl -X POST "https://www.orgo.ai/api/templates?auto_build=true&force=true" \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/yaml" \
  --data-binary @claude-code.yaml
```

## Next steps

<CardGroup cols={2}>
  <Card title="Add secrets" icon="key" href="/guides/templates/secrets">
    Let users supply their own API keys.
  </Card>

  <Card title="Run services" icon="server" href="/guides/templates/schema#apps">
    Long-running processes with health checks.
  </Card>

  <Card title="React to events" icon="bolt" href="/guides/templates/triggers">
    Cron, file, HTTP, and metric triggers.
  </Card>

  <Card title="Full API" icon="code" href="/api-reference/templates/publish">
    Every templates endpoint.
  </Card>
</CardGroup>
