Skip to main content

POST /auth/refresh

Use this endpoint to obtain a new access token when the old one expires. You must provide a valid refresh token.

Request Body

refreshToken
string
required
The refresh token that was provided during login.

Response

accessToken
string
A new access token for authenticating subsequent requests.
refreshToken
string
A new refresh token may be returned as well, for token rotation. If so, the old refresh token will be invalidated.
curl -X POST https://api.llmgenerator.com/api/v1/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{
        "refreshToken": "YOUR_REFRESH_TOKEN"
      }'
{
  "accessToken": "ey_new...",
  "refreshToken": "ey_new..."
}