Skip to main content

POST /auth/logout

This endpoint invalidates the user’s session by revoking all their refresh tokens. Requires a valid access token in the Authorization header.
Access tokens remain valid until they expire (15 minutes). For immediate full logout, the client should also clear the access token locally.

Request Headers

Authorization
string
required
Bearer token. Format: Bearer YOUR_ACCESS_TOKEN

Response

success
boolean
Indicates whether the logout was successful.
message
string
A confirmation message.
curl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "success": true,
  "message": "Logout successful. All refresh tokens have been revoked."
}