curl -X POST https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456/regenerate \ -H "Authorization: Bearer YOUR_API_KEY"
Copy
{ "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."}
This endpoint regenerates an API key. This creates a new key value while keeping all metadata (name, description, permissions). The old key is immediately invalidated.
The new API key value is only shown once. The old key will stop working immediately.
You cannot regenerate the API key that is currently being used to make the request.
curl -X POST https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456/regenerate \ -H "Authorization: Bearer YOUR_API_KEY"
Copy
{ "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."}