> ## 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.

# Check Generation Status

> This endpoint retrieves the status of a generation job.

## GET /generate/{jobId}

This endpoint returns the current status of a generation job. Use this to check the progress of an ongoing generation or retrieve details of a completed job.

### Path Parameters

<ParamField path="jobId" type="string" required>
  The ID of the generation job to check.
</ParamField>

### Response

<ResponseField name="id" type="string">
  The unique identifier for the generation job.
</ResponseField>

<ResponseField name="siteId" type="string">
  The ID of the site being generated.
</ResponseField>

<ResponseField name="status" type="string">
  The current status: `pending`, `processing`, `completed`, or `failed`.
</ResponseField>

<ResponseField name="progress" type="number">
  The progress percentage (0-100).
</ResponseField>

<ResponseField name="url" type="string">
  The URL for which the file was generated.
</ResponseField>

<ResponseField name="options" type="object">
  The generation options used.

  <Expandable title="options properties">
    <ResponseField name="maxUrls" type="number">
      Maximum URLs processed.
    </ResponseField>

    <ResponseField name="showFullText" type="boolean">
      Whether full text was included.
    </ResponseField>

    <ResponseField name="generationMethod" type="string">
      Method used: `simple` or `enhanced`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="fileUrl" type="string">
  URL to access the generated file (when completed).
</ResponseField>

<ResponseField name="fullTextUrl" type="string">
  URL to access the full-text version (when completed).
</ResponseField>

<ResponseField name="error" type="string">
  Error message if the job failed.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of job creation.
</ResponseField>

<ResponseField name="completedAt" type="string">
  ISO 8601 timestamp of job completion.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/generate/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/generate/550e8400-e29b-41d4-a716-446655440000',
    {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    }
  );

  const status = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Processing theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "siteId": "site_abc123",
    "status": "processing",
    "progress": 45,
    "url": "https://example.com",
    "options": {
      "maxUrls": 50,
      "showFullText": true,
      "generationMethod": "enhanced"
    },
    "fileUrl": null,
    "fullTextUrl": null,
    "error": null,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": null
  }
  ```

  ```json Completed theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "siteId": "site_abc123",
    "status": "completed",
    "progress": 100,
    "url": "https://example.com",
    "options": {
      "maxUrls": 50,
      "showFullText": true,
      "generationMethod": "enhanced"
    },
    "fileUrl": "https://api.llmgenerator.com/api/v1/file/site_abc123",
    "fullTextUrl": "https://api.llmgenerator.com/api/v1/file/site_abc123?full=true",
    "error": null,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": "2026-01-20T10:05:00.000Z"
  }
  ```

  ```json Failed theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "siteId": "site_abc123",
    "status": "failed",
    "progress": 0,
    "url": "https://example.com",
    "options": {
      "maxUrls": 50,
      "showFullText": false,
      "generationMethod": "simple"
    },
    "fileUrl": null,
    "fullTextUrl": null,
    "error": "Failed to fetch sitemap: 404 Not Found",
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": "2026-01-20T10:00:30.000Z"
  }
  ```
</ResponseExample>
