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

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//regenerate

API キーを再生成します。メタデータ(名称・説明・権限)は維持しつつキー値を新しくします。古いキーは直ちに無効になります。
新しい API キー値はこのとき一度だけ表示されます。古いキーはすぐに使えなくなります。
現在のリクエストに使用している API キーは再生成できません。

パスパラメーター

keyId
string
必須
再生成する API キーの ID。

レスポンス

success
boolean
再生成が成功したかどうか。
message
string
ステータスメッセージ。
apiKey
object
再生成後の API キー詳細。
warning
string
旧キーが無効になった旨のリマインダー。
curl -X POST https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456/regenerate \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "message": "API key regenerated successfully",
  "apiKey": {
    "id": "llm_1706123456_abc123def456",
    "name": "Production Key",
    "key": "llm_1706456789_newvalue567xyz",
    "regeneratedAt": "2026-01-27T10:00:00.000Z"
  },
  "warning": "This is the only time the new API key will be shown. Please save it securely. The old key is now invalid."
}