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

# Quickstart

> Your first Word document in under 5 minutes.

<Tip>Writing TypeScript? The [SDK](/en/sdk/introduction) does the same in three lines.</Tip>

<Steps>
  <Step title="Get an API key">
    Keys start with their project's region: `ak_eu_` (European Union) or `ak_us_` (United States). Store it in an environment variable:

    ```bash theme={null}
    export DOCONDA_API_KEY="ak_eu_..."
    ```
  </Step>

  <Step title="Create a document">
    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.eu.doconda.com/v1/documents \
        -H "Authorization: Bearer $DOCONDA_API_KEY" \
        -H "Content-Type: application/json" \
        -H "Idempotency-Key: $(uuidgen)" \
        -d '{
          "format": "docx",
          "content": { "markdown": "# Leave request\n\nDear Ms. García: ..." },
          "style": "dark blue headings and centred title"
        }'
      ```

      ```js Node theme={null}
      const res = await fetch("https://api.eu.doconda.com/v1/documents", {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.DOCONDA_API_KEY}`,
          "Content-Type": "application/json",
          "Idempotency-Key": crypto.randomUUID(),
        },
        body: JSON.stringify({
          format: "docx",
          content: { markdown: "# Leave request\n\nDear Ms. García: ..." },
          style: "dark blue headings and centred title",
        }),
      })
      const doc = await res.json()
      ```

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

      doc = requests.post(
          "https://api.eu.doconda.com/v1/documents",
          headers={
              "Authorization": f"Bearer {os.environ['DOCONDA_API_KEY']}",
              "Idempotency-Key": str(uuid.uuid4()),
          },
          json={
              "format": "docx",
              "content": {"markdown": "# Leave request\n\nDear Ms. García: ..."},
              "style": "dark blue headings and centred title",
          },
      ).json()
      ```
    </CodeGroup>
  </Step>

  <Step title="Download the Word file and the PDF">
    The call waits until the document is ready and returns the links in `outputs`:

    ```json theme={null}
    {
      "id": "doc_01JAB3H8K2M7V6X5T1R0NPQ4ZW",
      "object": "document",
      "status": "ready",
      "pages": 1,
      "outputs": [
        { "kind": "docx", "url": "https://…", "expires_at": "…" },
        { "kind": "pdf", "url": "https://…", "expires_at": "…" }
      ]
    }
    ```

    <Note>Links expire after 5 minutes. Get new ones with `GET /documents/{id}/outputs`.</Note>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Watch it being written" icon="zap" href="/en/guides/modes">Add `"stream": true`.</Card>
  <Card title="Adjust the style" icon="palette" href="/en/guides/style">In JSON or in free text.</Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.