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

# Login



## OpenAPI

````yaml /api-reference/openapi.json post /v1/auth/login
openapi: 3.1.0
info:
  title: Visceral Backend
  version: 0.2.0
  description: >-
    The Visceral backend HTTP API. SDK and ingestion endpoints authenticate with
    a workspace API key; dashboard and CLI endpoints authenticate with a user
    session token. Both are sent as `Authorization: Bearer <token>`.
servers:
  - url: https://api.visceralai.dev
security: []
paths:
  /v1/auth/login:
    post:
      tags:
        - auth
      summary: Login
      operationId: login_v1_auth_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LoginRequest:
      properties:
        username:
          type: string
          minLength: 1
          title: Username
        password:
          type: string
          maxLength: 256
          minLength: 1
          title: Password
      type: object
      required:
        - username
        - password
      title: LoginRequest
    TokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        expires_in:
          type: integer
          title: Expires In
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
        - access_token
        - expires_in
        - refresh_token
      title: TokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````