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

# Quickstart Guide

> Get started with the LLMGenerator API in just a few minutes. Generate your first llms.txt file with a single API call.

This guide will walk you through the essential steps to start using the LLMGenerator API. By the end, you'll be able to generate your first `llms.txt` file.

## 1. Create an Account & Get API Key

Before you can use the API, you need to create an LLMGenerator account and obtain an API key.

1. **Sign Up**: [Create an account](https://app.llmgenerator.com) on the LLMGenerator dashboard.
2. **Navigate to API Keys**: Go to [Settings → API Keys](https://app.llmgenerator.com/settings/api-keys).
3. **Create a Key**: Generate a new API key. Copy it and store it securely — it's only shown once.

Your API key will look like this: `llmgen_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`.

## 2. Make Your First API Request

Now you can use your API key to make requests to the LLMGenerator API. The primary endpoint for creating `llms.txt` files is `/api/v1/generate`.

You'll need to send a `POST` request with your API key in the `Authorization` header as a Bearer token.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/generate \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://www.example.com",
      "options": {
        "maxUrls": 10,
        "showFullText": true,
        "generationMethod": "simple"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const apiKey = 'YOUR_API_KEY';
  const url = 'https://api.llmgenerator.com/api/v1/generate';

  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://www.example.com',
      options: {
        maxUrls: 10,
        showFullText: true,
        generationMethod: 'simple' // or 'enhanced' (2x credits)
      }
    })
  });

  const data = await response.json();
  console.log(data);
  ```

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

  api_key = "YOUR_API_KEY"
  api_url = "https://api.llmgenerator.com/api/v1/generate"

  headers = {
      "Authorization": f"Bearer {api_key}",
      "Content-Type": "application/json"
  }

  payload = {
      "url": "https://www.example.com",
      "options": {
          "maxUrls": 10,
          "showFullText": True,
          "generationMethod": "simple"  # or "enhanced" (2x credits)
      }
  }

  response = requests.post(api_url, headers=headers, json=payload)
  print(response.json())
  ```
</CodeGroup>

<Info>
  Remember to replace `YOUR_API_KEY` with the actual API key you obtained in the first step.
</Info>

## 3. Check the Response

If your request is successful, you'll receive a JSON response with the job result and file URL:

```json theme={null}
{
  "jobId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "progress": 100,
  "message": "Generation completed successfully",
  "fileTextUrl": "https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000"
}
```

You can now access your `llms.txt` file at the provided `fileTextUrl`. The file is publicly accessible and cached for performance.

## 4. Access Your File

The generated file can be accessed in several ways. Use the `siteId` from the `jobId` response or look it up via `GET /api/v1/sites`:

```bash theme={null}
# View in browser (returns llms.txt text)
curl https://api.llmgenerator.com/api/v1/file/YOUR_SITE_ID

# Download as file
curl https://api.llmgenerator.com/api/v1/file/YOUR_SITE_ID/download -o llms.txt
```

## Next Steps

You've successfully generated your first `llms.txt` file! Here are a few things you can do next:

* Explore the full [API Reference](/api-reference/introduction) to discover all available endpoints and options.
* Learn about [URL Discovery](/api-reference/discovery/start) to find URLs before generation.
* Check your [credit balance](/api-reference/credits/balance) and [transaction history](/api-reference/credits/history).
* [Export as Markdown](/api-reference/markdown/export) for alternative formats (paid plans).
* Manage your sites and view analytics in the [LLMGenerator Dashboard](https://app.llmgenerator.com/dashboard).
