Skip to main content

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

email
string
required
The user’s email address. This must be a valid and unique email.
password
string
required
The user’s password. It must be at least 8 characters long.
firstName
string
required
The user’s first name.
lastName
string
The user’s last name.
company
string
The user’s company name.

Response

user
object
An object containing the newly created user’s information.
id
string
The unique identifier for the user.
email
string
The user’s email address.
firstName
string
The user’s first name.
tokens
object
An object containing the authentication tokens.
accessToken
string
The access token for authenticating subsequent requests.
refreshToken
string
The refresh token for obtaining new access tokens.
apiKey
string
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"
}