POST /auth/register
This endpoint is used to create a new user account. It is a public endpoint and does not require authentication.
Request Body
The user’s email address. This must be a valid and unique email.
The user’s password. It must be at least 8 characters long.
Response
An object containing the newly created user’s information.The unique identifier for the user.
The user’s email address.
An object containing the authentication tokens.The access token for authenticating subsequent requests.
The refresh token for obtaining new access tokens.
A default API key created for the new user.
curl -X POST https://api.llmgenerator.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123",
"firstName": "John",
"lastName": "Doe"
}'
{
"user": {
"id": "user_xxxxxxxxx",
"email": "[email protected]",
"firstName": "John"
},
"tokens": {
"accessToken": "ey...",
"refreshToken": "ey..."
},
"apiKey": "llmgen_xxxxxxxxxxxxxxxx"
}