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

# クイックスタートガイド

> 数分でLLMGenerator APIを使い始めましょう。1回のAPI呼び出しで最初のllms.txtファイルを生成します。

このガイドでは、LLMGenerator APIを使い始めるための基本的な手順を説明します。最後には、最初の`llms.txt`ファイルを生成できるようになります。

## 1. アカウントの作成とAPIキーの取得

APIを使用する前に、LLMGeneratorアカウントを作成してAPIキーを取得する必要があります。

1. **サインアップ**: LLMGeneratorダッシュボードで[アカウントを作成](https://llmgenerator.com/sign-up)します。
2. **API設定に移動**: ログイン後、アカウント設定の「APIキー」セクションに移動します。
3. **キーを作成**: 新しいAPIキーを生成します。コピーして安全な場所に保存してください。再度確認することはできません。

APIキーは次のような形式です：`llmgen_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`

## 2. 最初のAPIリクエスト

APIキーを使ってLLMGenerator APIにリクエストを送信できます。`llms.txt`ファイルを作成する主要なエンドポイントは`/api/v1/generate`です。

APIキーをBearerトークンとして`Authorization`ヘッダーに含めた`POST`リクエストを送信します。

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/generate \
    -H "Authorization: Bearer あなたの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 = 'あなたの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' // または 'enhanced'（2倍クレジット）
      }
    })
  });

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

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

  api_key = "あなたの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"  # または "enhanced"（2倍クレジット）
      }
  }

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

<Info>
  `あなたのAPIキー`を、最初の手順で取得した実際のAPIキーに置き換えてください。
</Info>

## 3. レスポンスの確認

リクエストが成功すると、サイトの詳細とファイルURLを含むJSONレスポンスが返されます：

```json theme={null}
{
  "success": true,
  "message": "llms.txtファイルが正常に生成されました",
  "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. ファイルへのアクセス

生成されたファイルにはいくつかの方法でアクセスできます：

```bash theme={null}
# ブラウザで表示
curl https://api.llmgenerator.com/api/v1/file/あなたのサイトID

# ファイルとしてダウンロード
curl https://api.llmgenerator.com/api/v1/file/あなたのサイトID/download -o llms.txt

# フルテキスト版を取得
curl "https://api.llmgenerator.com/api/v1/file/あなたのサイトID?full=true"
```

## 次のステップ

最初の`llms.txt`ファイルの生成に成功しました！次にできることをご紹介します：

* [APIリファレンス](/ja/api-reference/introduction)で利用可能なすべてのエンドポイントとオプションを確認する。
* [URL ディスカバリー](/ja/api-reference/discovery/start)で生成前にURLを検出する方法を学ぶ。
* [クレジット残高](/ja/api-reference/credits/balance)と[取引履歴](/ja/api-reference/credits/history)を確認する。
* [MCPサーバー](/ja/integrations/mcp)を使ってClaude、CursorなどのAIエージェントと連携する。
* [LLMGeneratorダッシュボード](https://app.llmgenerator.com)でサイトを管理し、分析を確認する。
