> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Konto anlegen

> Dieser Endpunkt legt ein neues Nutzerkonto an.

## POST /accounts

Mit diesem Endpunkt wird ein neues Nutzerkonto erstellt. Es handelt sich um einen öffentlichen Endpunkt ohne Authentifizierung.

<Note>
  In den meisten Fällen sollten sich Nutzer über die Webanwendung unter [app.llmgenerator.com](https://app.llmgenerator.com) registrieren. Dieser Endpunkt dient vor allem der programmatischen Kontoerstellung.
</Note>

### Anfragetext

<ParamField body="email" type="string" required>
  E-Mail-Adresse des Nutzers. Muss eindeutig sein.
</ParamField>

<ParamField body="firstName" type="string" required>
  Vorname des Nutzers (1–50 Zeichen).
</ParamField>

<ParamField body="lastName" type="string">
  Nachname des Nutzers (max. 50 Zeichen).
</ParamField>

<ParamField body="company" type="string">
  Firmenname des Nutzers (max. 100 Zeichen).
</ParamField>

### Antwort

<ResponseField name="success" type="boolean">
  Ob das Konto erfolgreich angelegt wurde.
</ResponseField>

<ResponseField name="message" type="string">
  Statusmeldung.
</ResponseField>

<ResponseField name="account" type="object">
  Details des angelegten Kontos.

  <Expandable title="Eigenschaften von account">
    <ResponseField name="id" type="string">
      Eindeutige Kennung des Kontos.
    </ResponseField>

    <ResponseField name="email" type="string">
      E-Mail-Adresse des Nutzers.
    </ResponseField>

    <ResponseField name="firstName" type="string">
      Vorname des Nutzers.
    </ResponseField>

    <ResponseField name="lastName" type="string">
      Nachname des Nutzers.
    </ResponseField>

    <ResponseField name="plan" type="string">
      Tarif des Kontos (beginnt mit `free`).
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO-8601-Zeitstempel der Kontoerstellung.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="apiKey" type="string">
  Erster API-Schlüssel für das Konto. Sicher aufbewahren.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/accounts \
    -H "Content-Type: application/json" \
    -d '{
      "email": "user@example.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "company": "Acme Inc"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/accounts',
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        email: 'user@example.com',
        firstName: 'Jane',
        lastName: 'Doe',
        company: 'Acme Inc'
      })
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json Success (201) theme={null}
  {
    "success": true,
    "message": "Account created successfully",
    "account": {
      "id": "user_abc123def456",
      "email": "user@example.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "company": "Acme Inc",
      "plan": "free",
      "createdAt": "2026-01-27T10:00:00.000Z"
    },
    "apiKey": "llm_1706345678_initialkeyabc123"
  }
  ```

  ```json Validation Error (400) theme={null}
  {
    "message": "Validation error: Invalid email format"
  }
  ```

  ```json Email Already Exists (409) theme={null}
  {
    "message": "An account with this email already exists"
  }
  ```
</ResponseExample>
