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

# Quickstart

> Make your first API call in 5 minutes

<Info>
  **Base URL:** `https://api.app.hrizn.io/v1/public` — all examples below use this production URL.
</Info>

<Steps>
  <Step title="Get an API Key">
    Navigate to the **Dealership Manager** in the [Hrizn Dashboard](https://app.hrizn.io), select a dealership, and click the **API** tab. Click **Create API Key**, select the scopes you need, and copy the key.

    <Warning>
      The raw API key is shown **only once** at creation time. Store it securely.
    </Warning>

    <Note>
      API keys always start with the `hzk_` prefix. If your key doesn't start with `hzk_`, something went wrong — regenerate it from the dashboard.
    </Note>
  </Step>

  <Step title="Test the Connection">
    Verify your key works by hitting the health endpoint:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl https://api.app.hrizn.io/v1/public/health
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch("https://api.app.hrizn.io/v1/public/health");
      const data = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.get("https://api.app.hrizn.io/v1/public/health")
      data = response.json()
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/health");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>

    Then fetch your site details:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl https://api.app.hrizn.io/v1/public/site \
        -H "X-API-Key: hzk_your_key_here"
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch("https://api.app.hrizn.io/v1/public/site", {
        headers: { "X-API-Key": "hzk_your_key_here" },
      });
      const { data } = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.get(
          "https://api.app.hrizn.io/v1/public/site",
          headers={"X-API-Key": "hzk_your_key_here"},
      )
      data = response.json()["data"]
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/site");
      curl_setopt_array($ch, [
          CURLOPT_HTTPHEADER => ["X-API-Key: hzk_your_key_here"],
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>

    You should get a response like:

    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      "data": {
        "id": "8eba316f-8424-4863-8f4b-e53c4a44d2b7",
        "name": "Empire Chevrolet of Huntington",
        "vertical": "automotive",
        "domain": "https://www.shopempirechevrolet.com",
        "city": "Huntington",
        "state": "NY",
        "zip": "11743",
        "created_at": "2024-11-08T16:21:08.780217+00:00",
        "updated_at": "2026-02-27T21:11:02.638221+00:00"
      }
    }
    ```
  </Step>

  <Step title="Create an IdeaCloud">
    Start research on a topic:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl -X POST https://api.app.hrizn.io/v1/public/ideaclouds \
        -H "X-API-Key: hzk_your_key_here" \
        -H "Content-Type: application/json" \
        -d '{ "keyword": "2026 Chevrolet Equinox EV range and features" }'
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch("https://api.app.hrizn.io/v1/public/ideaclouds", {
        method: "POST",
        headers: {
          "X-API-Key": "hzk_your_key_here",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ keyword: "2026 Chevrolet Equinox EV range and features" }),
      });
      const { data } = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.post(
          "https://api.app.hrizn.io/v1/public/ideaclouds",
          headers={"X-API-Key": "hzk_your_key_here"},
          json={"keyword": "2026 Chevrolet Equinox EV range and features"},
      )
      data = response.json()["data"]
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/ideaclouds");
      curl_setopt_array($ch, [
          CURLOPT_POST => true,
          CURLOPT_HTTPHEADER => [
              "X-API-Key: hzk_your_key_here",
              "Content-Type: application/json",
          ],
          CURLOPT_POSTFIELDS => json_encode(["keyword" => "2026 Chevrolet Equinox EV range and features"]),
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>

    Response (202 Accepted):

    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      "data": {
        "id": "bd72cd59-beda-4ce5-a9a1-20acf16c9a5d",
        "status": "researching",
        "keyword": "2026 Chevrolet Equinox EV range and features"
      }
    }
    ```
  </Step>

  <Step title="Poll for Completion">
    Check the IdeaCloud status:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl https://api.app.hrizn.io/v1/public/ideaclouds/a1b2c3d4-... \
        -H "X-API-Key: hzk_your_key_here"
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch(
        "https://api.app.hrizn.io/v1/public/ideaclouds/a1b2c3d4-...",
        { headers: { "X-API-Key": "hzk_your_key_here" } },
      );
      const { data } = await res.json();
      console.log(data.status); // "researching" → "complete"
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.get(
          "https://api.app.hrizn.io/v1/public/ideaclouds/a1b2c3d4-...",
          headers={"X-API-Key": "hzk_your_key_here"},
      )
      data = response.json()["data"]
      print(data["status"])  # "researching" → "complete"
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/ideaclouds/a1b2c3d4-...");
      curl_setopt_array($ch, [
          CURLOPT_HTTPHEADER => ["X-API-Key: hzk_your_key_here"],
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      echo $data->data->status; // "researching" → "complete"
      ```
    </CodeGroup>

    When `status` changes to `complete`, the IdeaCloud is ready.

    <Tip>
      Instead of polling, set up a [webhook](/webhooks) to receive a push notification when the IdeaCloud completes.
    </Tip>
  </Step>

  <Step title="Generate Content">
    Create content from the completed IdeaCloud:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl -X POST https://api.app.hrizn.io/v1/public/content \
        -H "X-API-Key: hzk_your_key_here" \
        -H "Content-Type: application/json" \
        -d '{
          "ideacloud_id": "a1b2c3d4-...",
          "article_type": "basic",
          "auto_compliance": true,
          "auto_content_tools": true
        }'
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch("https://api.app.hrizn.io/v1/public/content", {
        method: "POST",
        headers: {
          "X-API-Key": "hzk_your_key_here",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          ideacloud_id: "a1b2c3d4-...",
          article_type: "basic",
          auto_compliance: true,
          auto_content_tools: true,
        }),
      });
      const { data } = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.post(
          "https://api.app.hrizn.io/v1/public/content",
          headers={"X-API-Key": "hzk_your_key_here"},
          json={
              "ideacloud_id": "a1b2c3d4-...",
              "article_type": "basic",
              "auto_compliance": True,
              "auto_content_tools": True,
          },
      )
      data = response.json()["data"]
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/content");
      curl_setopt_array($ch, [
          CURLOPT_POST => true,
          CURLOPT_HTTPHEADER => [
              "X-API-Key: hzk_your_key_here",
              "Content-Type: application/json",
          ],
          CURLOPT_POSTFIELDS => json_encode([
              "ideacloud_id" => "a1b2c3d4-...",
              "article_type" => "basic",
              "auto_compliance" => true,
              "auto_content_tools" => true,
          ]),
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>
  </Step>

  <Step title="Retrieve the Content">
    Once the content is complete, get the HTML:

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl https://api.app.hrizn.io/v1/public/content/{id}/html \
        -H "X-API-Key: hzk_your_key_here"
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch(
        "https://api.app.hrizn.io/v1/public/content/{id}/html",
        { headers: { "X-API-Key": "hzk_your_key_here" } },
      );
      const { data } = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.get(
          "https://api.app.hrizn.io/v1/public/content/{id}/html",
          headers={"X-API-Key": "hzk_your_key_here"},
      )
      data = response.json()["data"]
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/content/{id}/html");
      curl_setopt_array($ch, [
          CURLOPT_HTTPHEADER => ["X-API-Key: hzk_your_key_here"],
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>

    Or get all components (body, SEO metadata, schemas, social snippets):

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl https://api.app.hrizn.io/v1/public/content/{id}/components \
        -H "X-API-Key: hzk_your_key_here"
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const res = await fetch(
        "https://api.app.hrizn.io/v1/public/content/{id}/components",
        { headers: { "X-API-Key": "hzk_your_key_here" } },
      );
      const { data } = await res.json();
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import requests

      response = requests.get(
          "https://api.app.hrizn.io/v1/public/content/{id}/components",
          headers={"X-API-Key": "hzk_your_key_here"},
      )
      data = response.json()["data"]
      ```

      ```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $ch = curl_init("https://api.app.hrizn.io/v1/public/content/{id}/components");
      curl_setopt_array($ch, [
          CURLOPT_HTTPHEADER => ["X-API-Key: hzk_your_key_here"],
          CURLOPT_RETURNTRANSFER => true,
      ]);
      $data = json_decode(curl_exec($ch));
      ```
    </CodeGroup>
  </Step>
</Steps>

<Check>
  **You've completed the quickstart!** You now know how to authenticate, create IdeaClouds, generate content, and retrieve the results.
</Check>

## What's Next

<Tabs>
  <Tab title="Webhooks Path">
    Skip polling entirely by setting up real-time push notifications:

    <CardGroup cols={2}>
      <Card title="Webhooks Guide" icon="bell" href="/webhooks">
        Register endpoints and verify HMAC signatures.
      </Card>

      <Card title="Webhook Events" icon="list" href="/api-reference/reference/webhook-events">
        Browse all available event types.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Explore the API">
    Dive deeper into specific capabilities:

    <CardGroup cols={2}>
      <Card title="Authentication" icon="key" href="/authentication">
        Learn about API key scopes and security.
      </Card>

      <Card title="Inventory" icon="car" href="/api-reference/inventory/list">
        Access vehicle data and AI descriptions.
      </Card>

      <Card title="Bulk Generation" icon="layer-group" href="/guides/bulk-content-generation">
        Generate hundreds of articles across sites.
      </Card>

      <Card title="Full Reference" icon="book" href="/api-reference/overview">
        Browse all available endpoints.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
