---
title: "Log in"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Log in

`POST /auth/login`

## Request

- Base URL: `https://api.llm-broker.net`
- URL: `https://api.llm-broker.net/auth/login`
- Auth: none required

Authenticate with email and password. Returns JWT access and refresh tokens.

## Request body

- LoginRequest
  - `email` string, email, required
  - `password` string, password, required

## Response `200`

Login successful

- AuthResponse
  - `access_token` string: JWT access token (24h TTL)
  - `api_key` string, nullable: Default API key (on register)
  - `refresh_token` string: JWT refresh token (30d TTL)
  - `user` UserProfile
    - `created_at` string, date-time
    - `display_name` string, nullable
    - `email` string, email, required
    - `id` string, required
    - `role` 'user' | 'admin'
    - `updated_at` string, date-time

## Other responses

- `401`: Invalid credentials
- `403`: Account banned or pending
- `429`: Too many attempts

---

[API](https://skmtc.dev/llm-broker/apis/astrioncore-core-api.md) · [All operations](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/revisions/f85835487bf5?raw)
