메인 콘텐츠로 건너뛰기

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
필수
키를 구분하기 위한 이름입니다(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."
}