GET /api-keys/
返回单个 API Key 的详细信息。出于安全考虑,从不返回完整密钥。路径参数
string
必填
要查询的 API Key ID。
响应
string
API Key 唯一标识。
string
用户自定义名称。
string
脱敏预览(例如
llm_1234...abcd)。boolean
密钥是否可用。
string
最近使用时间(ISO 8601)。
string
创建时间(ISO 8601)。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X GET https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456',
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const key = await response.json();
{
"id": "llm_1706123456_abc123def456",
"name": "Production Key",
"keyPreview": "llm_1706...f456",
"description": null,
"permissions": [],
"isActive": true,
"lastUsedAt": "2026-01-20T15:30:00.000Z",
"expiresAt": null,
"createdAt": "2026-01-01T10:00:00.000Z"
}
{
"message": "API key not found"
}
{
"message": "Access denied to this API key"
}
获取指定 API Key 的详细信息。
curl -X GET https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456',
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const key = await response.json();
{
"id": "llm_1706123456_abc123def456",
"name": "Production Key",
"keyPreview": "llm_1706...f456",
"description": null,
"permissions": [],
"isActive": true,
"lastUsedAt": "2026-01-20T15:30:00.000Z",
"expiresAt": null,
"createdAt": "2026-01-01T10:00:00.000Z"
}
{
"message": "API key not found"
}
{
"message": "Access denied to this API key"
}
llm_1234...abcd)。curl -X GET https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456',
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const key = await response.json();
{
"id": "llm_1706123456_abc123def456",
"name": "Production Key",
"keyPreview": "llm_1706...f456",
"description": null,
"permissions": [],
"isActive": true,
"lastUsedAt": "2026-01-20T15:30:00.000Z",
"expiresAt": null,
"createdAt": "2026-01-01T10:00:00.000Z"
}
{
"message": "API key not found"
}
{
"message": "Access denied to this API key"
}
此页面对您有帮助吗?