Saltar al contenido principal
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 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.
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"
    }
  }'
Sustituye TU_CLAVE_API por la clave real del paso 1.

3. Revisa la respuesta

Si la petición tiene éxito, recibirás un JSON con datos del sitio y URLs del archivo:
{
  "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

# 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