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

# Quickstart

> Create an agent and stream its first reply in two API calls.

Agent37 Cloud gives every user their own hosted agent computer. Create an instance and Hermes comes back running at its own URL: it chats, streams, browses, runs tools, and keeps state between conversations — files, connected accounts, and memory stay on the agent until you delete it. You create the agent with one call, then talk to it with the next; you never touch a server.

<Note>
  **Building with an AI coding agent?** Point it at **[llms-full.txt](https://www.agent37.com/docs/llms-full.txt)** — the entire API in one file — and it can scaffold a working client.
</Note>

**Three ways to build on Agent37:**

<CardGroup cols={3}>
  <Card title="Starter Kit" icon="rocket" href="/agents-api/white-label">
    Fork a white-label, multi-tenant dashboard, rebrand it, and deploy. The fastest way to ship.
  </Card>

  <Card title="Build a chat app" icon="message" href="/agents-api/chat-app">
    Wire the two API planes into your own app. Where most teams start.
  </Card>

  <Card title="Custom Docker image" icon="package" href="/agents-api/custom-image">
    Extend Hermes or bring any Dockerfile — Agent37 builds the image in the cloud.
  </Card>
</CardGroup>

The rest of this page is the API itself — create an instance and stream a reply in two calls.

<img src="https://mintcdn.com/agent37/dn3z5Qr_b-K0QInE/images/agent37-gateway-flow.svg?fit=max&auto=format&n=dn3z5Qr_b-K0QInE&q=85&s=1eee874b9f33a1be7556acf55eb284fc" alt="Agent37 Cloud routes requests from your app to isolated agent instances." width="1300" height="540" data-path="images/agent37-gateway-flow.svg" />

<Steps>
  <Step title="Get a key">
    Mint an API key at [www.agent37.com/dashboard/cloud/api-keys](https://www.agent37.com/dashboard/cloud/api-keys). The full `sk_live_...` key is shown once, at creation. Send it as `Authorization: Bearer` on `api.agent37.com` and as `X-Agent37-Key` on your instance's URL.

    New workspaces include enough credit to create one instance. Add funds from [billing](https://www.agent37.com/dashboard/cloud/billing) before you run more than one instance. [Billing](/agents-api/billing) covers pricing, instance limits, and top-up rules.
  </Step>

  <Step title="Create an instance">
    `POST /v1/instances` provisions a computer running the default `agent37-hermes` template and returns `201` once its `status` is `running`. Every field is optional, but include managed-spend headroom if you want built-in LLM calls to work from the first message.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://api.agent37.com/v1/instances \
        -H "Authorization: Bearer sk_live_..." \
        -H "Content-Type: application/json" \
        -d '{ "budget": { "credit_micros": 1000000 } }'
      ```

      ```python python theme={null}
      import requests

      H = {"Authorization": "Bearer sk_live_..."}
      inst = requests.post(
          "https://api.agent37.com/v1/instances",
          headers=H,
          json={"budget": {"credit_micros": 1_000_000}},
      ).json()
      ```

      ```javascript node theme={null}
      const H = { Authorization: "Bearer sk_live_..." };
      const inst = await (await fetch("https://api.agent37.com/v1/instances", {
        method: "POST",
        headers: { ...H, "Content-Type": "application/json" },
        body: JSON.stringify({ budget: { credit_micros: 1_000_000 } }),
      })).json();
      ```

      ```json response theme={null}
      {
        "id": "ab12cd34ef",
        "status": "running",
        "status_reason": null,
        "template": "agent37-hermes",
        "image_ref": "ghcr.io/agent37-platform/hermes:2026.07.02b",
        "image_digest": "sha256:4f8d0d9e9f3b3a5a9f4488fb33274de9f7b7450c6cf6d3573e68fd231d7c8891",
        "resources": { "cpu": 2, "memory": 4, "disk": 6 },
        "url": "https://ab12cd34ef.agent37.app",
        "domain_urls": [],
        "public_ports": [],
        "user": null,
        "name": null,
        "metadata": null,
        "auto_sleep": false,
        "idle_timeout_seconds": 300,
        "past_due": false,
        "created": 1781049600
      }
      ```
    </CodeGroup>

    The `url` is the instance's own API: the instance id is the DNS label, so `ab12cd34ef` answers at `https://ab12cd34ef.agent37.app`. That is the address you talk to next. Any other port — the agent's dashboard, terminal, and files included — is reachable at `https://ab12cd34ef-{port}.agent37.app`; see [Instance and preview URLs](/agents-api/urls).
  </Step>

  <Step title="Send it a streamed message">
    `POST /v1/responses` on the instance URL runs a turn. Set `stream: true` to receive Server-Sent Events as the agent reasons, calls tools, and writes its answer. Same `sk_live_` key, sent as the `X-Agent37-Key` header.

    <CodeGroup>
      ```bash curl theme={null}
      curl -N https://ab12cd34ef.agent37.app/v1/responses \
        -H "X-Agent37-Key: sk_live_..." \
        -H "Content-Type: application/json" \
        -d '{
          "input": "Research the top 3 EV makers, write a memo.",
          "stream": true
        }'
      ```

      ```python python theme={null}
      AGENT_H = {"X-Agent37-Key": "sk_live_..."}
      r = requests.post(
          "https://ab12cd34ef.agent37.app/v1/responses",
          headers=AGENT_H,
          stream=True,
          json={
              "input": "Research the top 3 EV makers, write a memo.",
              "stream": True,
          },
      )
      for line in r.iter_lines():
          print(line.decode())
      ```

      ```javascript node theme={null}
      const AGENT_H = { "X-Agent37-Key": "sk_live_..." };
      const res = await fetch("https://ab12cd34ef.agent37.app/v1/responses", {
        method: "POST",
        headers: { ...AGENT_H, "Content-Type": "application/json" },
        body: JSON.stringify({
          input: "Research the top 3 EV makers, write a memo.",
          stream: true,
        }),
      });
      // res.body is an SSE stream of named events
      ```
    </CodeGroup>

    The stream opens with `response.created`, which carries the ids you need, and ends with a terminal event after which the server closes the connection:

    ```text events theme={null}
    event: response.created
    data: {"id":"c91d2a7e84f04b6f9a3d5e1c0b87f4a2","session_id":"7f3e0b6c52a949d2b1c4a8e9d0f31726"}

    event: response.output_text.delta
    data: {"text":"Here is the memo. Tesla still leads on"}

    event: response.completed
    data: {"output_text":"Here is the memo...","usage":{"input_tokens":1840,"output_tokens":920,"cost_usd":0.0137}}
    ```

    <Tip>
      Prefer not to stream? Leave `stream` off (the default is `false`) and the call returns the finished response as one JSON body.
    </Tip>
  </Step>

  <Step title="Continue the conversation">
    Reuse the `session_id` to continue the same thread. The agent keeps the full history on the instance, so you send only the new input.

    ```bash curl theme={null}
    curl https://ab12cd34ef.agent37.app/v1/responses \
      -H "X-Agent37-Key: sk_live_..." \
      -H "Content-Type: application/json" \
      -d '{
        "session_id": "7f3e0b6c52a949d2b1c4a8e9d0f31726",
        "input": "Make it shorter, add a quote."
      }'
    ```
  </Step>
</Steps>

<Note>
  Done experimenting? `DELETE /v1/instances/{id}` ends billing on the spot: compute is metered per minute, so you only ever pay for the time the instance existed. See [Billing](/agents-api/billing).
</Note>

<Note>
  Looking for **OpenClaw** channel, model, or networking setup? Start at the [OpenClaw overview](/openclaw/overview).
</Note>
