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

# Login

> Authenticate with email and password. Returns JWT access and refresh tokens. If 2FA is enabled, returns a challenge token instead.



## OpenAPI

````yaml /api-reference/openapi.json post /auth/login
openapi: 3.1.0
info:
  title: Nova Cloud API
  description: >-
    REST API for the Nova Cloud GPU rental platform. Manage virtual machines,
    SSH keys, billing, and more.
  version: 1.0.0
  contact:
    name: Nova Cloud Support
    email: support@nova-cloud.ai
    url: https://nova-cloud.ai
servers:
  - url: https://api.nova-cloud.ai
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: User registration, login, and token management
  - name: API Keys
    description: Create and manage API keys for programmatic access
  - name: SSH Keys
    description: Upload and manage SSH public keys for VM access
  - name: Virtual Machines
    description: Create, manage, and monitor GPU-powered VMs
  - name: Search & Pricing
    description: Browse available GPU offers and current pricing
  - name: Billing
    description: Balance, usage, transactions, and payment management
  - name: Reservations
    description: Reserved instance pricing and management
paths:
  /auth/login:
    post:
      tags:
        - Authentication
      summary: Login
      description: >-
        Authenticate with email and password. Returns JWT access and refresh
        tokens. If 2FA is enabled, returns a challenge token instead.
      operationId: login
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          description: Invalid credentials
      security: []
components:
  schemas:
    LoginRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
        password:
          type: string
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: JWT access token (expires in 1 hour)
        refresh_token:
          type: string
          description: Refresh token for obtaining new access tokens
        token_type:
          type: string
          example: bearer
        expires_in:
          type: integer
          example: 3600
          description: Token lifetime in seconds
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: Use a JWT access token or API key (prefixed with nv_)

````