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

# Quickstart

> Get your API key and make your first SuperDocs API call in under 5 minutes.

# Quickstart

Go from zero to your first AI-powered document edit in 5 minutes.

## 1. Create an account

Sign up at [use.superdocs.app](https://use.superdocs.app) with Google or email/password. Free plan includes 500 operations per month — an **operation** is one AI request that modifies, analyzes, or searches a document (uploads/parsing and exports are free; very large edits count one operation per 25 sections changed). Full definition and examples: [Plans & Usage](/account/plans-and-usage#what-counts-as-an-operation).

## 2. Create an API key

1. Click the **gear icon** in the app to open Settings
2. Go to the **API Keys** tab
3. Click **Create API Key** and give it a name
4. **Copy the key immediately** — it's only shown once

Your key looks like: `sk_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4`

<Note>
  Building an autonomous agent? You can skip the UI entirely. One call to `POST /v1/agents/signup` returns a working key with no human in the loop. See [For AI Agents](/introduction/agent-signup).
</Note>

## 3. Make your first request

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.superdocs.app/v1/chat \
    -H "Authorization: Bearer sk_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "message": "Add a paragraph about data privacy at the end",
      "session_id": "my-first-session",
      "document_html": "<h1>Company Policy</h1><p>Welcome to our company.</p>"
    }'
  ```

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

  response = requests.post(
      "https://api.superdocs.app/v1/chat",
      headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
      json={
          "message": "Add a paragraph about data privacy at the end",
          "session_id": "my-first-session",
          "document_html": "<h1>Company Policy</h1><p>Welcome to our company.</p>"
      }
  )

  data = response.json()
  print(data["response"])
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.superdocs.app/v1/chat", {
    method: "POST",
    headers: {
      "Authorization": "Bearer sk_YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      message: "Add a paragraph about data privacy at the end",
      session_id: "my-first-session",
      document_html: "<h1>Company Policy</h1><p>Welcome to our company.</p>"
    })
  });

  const data = await response.json();
  console.log(data.response);
  ```
</CodeGroup>

<Note>
  **You choose the `session_id`.** It's any string you pick, not a value the server assigns or returns. There's no "create session" call: the first request that uses a new string starts that session, and reusing the same string continues it. Pick something stable per document or per user (e.g. `user_123_draft-contract`). See [Sessions](/concepts/sessions).
</Note>

## 4. Read the response

```json theme={null}
{
  "response": "I've added a data privacy paragraph at the end of the document.",
  "session_id": "my-first-session",
  "document_changes": {
    "updated_html": "<div data-chunk-id=\"...\"><h1>Company Policy</h1>...</div>",
    "changes_summary": "Document updated by AI"
  },
  "usage": {
    "monthly_used": 1,
    "monthly_limit": 500,
    "monthly_remaining": 499,
    "was_billable": true,
    "subscription_tier": "free"
  }
}
```

Key fields:

* `response` — The AI's reply explaining what it did
* `document_changes.updated_html` — The full updated document HTML. Render this in your editor.
* `usage` — How many operations you've used this month

## 5. Continue the conversation

Reuse the same `session_id` to keep editing. The server keeps your document between turns, so on a follow-up you send just the `message`. No need to re-send `document_html`:

```bash theme={null}
curl -X POST https://api.superdocs.app/v1/chat \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Make the data privacy section more formal",
    "session_id": "my-first-session"
  }'
```

The AI picks up the document it already holds for this session and returns the updated HTML again.

<Note>
  **When to re-send `document_html`:** only when *you* changed the HTML outside of chat. For example, the user edited the document in your own editor and you want the AI to see those edits. Then send the full current HTML (exactly as your editor has it, `data-chunk-id` attributes intact) and it replaces the server's copy. If chat is the only thing touching the document, omit `document_html` on every turn after the first. See [Documents](/concepts/documents#sending-document-html).
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Sessions" icon="clock-rotate-left" href="/concepts/sessions">
    How session persistence works
  </Card>

  <Card title="Documents" icon="file-lines" href="/concepts/documents">
    How to handle document HTML
  </Card>

  <Card title="Attachments" icon="paperclip" href="/concepts/attachments">
    Upload files for AI context
  </Card>

  <Card title="MCP Setup" icon="plug" href="/mcp/setup">
    Connect from Claude Desktop or Cursor
  </Card>

  <Card title="Building with AI?" icon="robot" href="https://docs.superdocs.app/llms-full.txt">
    Give your AI agent the complete reference file
  </Card>
</CardGroup>
