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

# Guía de inicio rápido

> Empieza con la API de LLMGenerator en unos minutos. Genera tu primer archivo llms.txt con una sola llamada a la API.

Esta guía recorre los pasos básicos para usar la API de LLMGenerator. Al final podrás generar tu primer archivo `llms.txt`.

## 1. Crea una cuenta y obtén la clave API

Antes de usar la API necesitas una cuenta de LLMGenerator y una clave API.

1. **Registro**: [Crea una cuenta](https://llmgenerator.com/sign-up) en el panel de LLMGenerator.
2. **Ajustes de API**: Tras iniciar sesión, ve a «Claves API» en la configuración de tu cuenta.
3. **Crear clave**: Genera una nueva clave API, cópiala y guárdala de forma segura — no podrás verla de nuevo.

El formato de tu clave será similar a: `llmgen_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`

## 2. Haz tu primera petición

Usa la clave en la cabecera `Authorization` como token Bearer en una petición `POST` al endpoint `/api/v1/generate`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/generate \
    -H "Authorization: Bearer TU_CLAVE_API" \
    -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 = 'TU_CLAVE_API';
  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'
      }
    })
  });

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

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

  api_key = "TU_CLAVE_API"
  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"
      }
  }

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

<Info>
  Sustituye `TU_CLAVE_API` por la clave real del paso 1.
</Info>

## 3. Revisa la respuesta

Si la petición tiene éxito, recibirás un JSON con datos del sitio y URLs del archivo:

```json theme={null}
{
  "success": true,
  "message": "Archivo llms.txt generado correctamente",
  "site": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com",
    "status": "completed"
  },
  "fileUrl": "https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000",
  "fullTextUrl": "https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000?full=true",
  "creditsUsed": 10,
  "creditsRemaining": 490
}
```

## 4. Accede al archivo

```bash theme={null}
# Ver en el navegador
curl https://api.llmgenerator.com/api/v1/file/ID_DE_TU_SITIO

# Descargar
curl https://api.llmgenerator.com/api/v1/file/ID_DE_TU_SITIO/download -o llms.txt

# Versión texto completo
curl "https://api.llmgenerator.com/api/v1/file/ID_DE_TU_SITIO?full=true"
```

## Siguientes pasos

* [Referencia API](/es/api-reference/introduction)
* [Descubrimiento de URL](/es/api-reference/discovery/start)
* Consulta tu [saldo de créditos](/es/api-reference/credits/balance) y el [historial de transacciones](/es/api-reference/credits/history).
* [Servidor MCP](/es/integrations/mcp) con Claude, Cursor y otros agentes
* [Panel LLMGenerator](https://app.llmgenerator.com)
