メインコンテンツへスキップ

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.

POST /api-keys

認証済みユーザー用に新しい API キーを作成します。キー値の全文は作成時のみ表示されます。安全に保管してください。
API キー値の全文は作成時のみ返されます。後から再取得できないため、必ず安全に保管してください。

リクエストボディ

name
string
必須
API キーの説明用名称(1〜100 文字)。
description
string
キーの用途の説明(最大 500 文字)。
permissions
array
キーに付与する権限の一覧。未指定時はすべての権限。
expiresAt
string
省略可能な有効期限(ISO 8601 形式)。

レスポンス

success
boolean
キーの作成が成功したかどうか。
message
string
ステータスメッセージ。
apiKey
object
作成された API キーの詳細。
warning
string
キーを安全に保存するよう促す文言。
curl -X POST https://api.llmgenerator.com/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production API Key",
    "description": "For the main application"
  }'
{
  "success": true,
  "message": "API key created successfully",
  "apiKey": {
    "id": "llm_1706345678_newkey123abc",
    "name": "Production API Key",
    "description": "For the main application",
    "key": "llm_1706345678_newkey123abc",
    "permissions": [],
    "expiresAt": null,
    "createdAt": "2026-01-27T10:00:00.000Z",
    "isActive": true
  },
  "warning": "This is the only time the full API key will be shown. Please save it securely."
}