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

# List API keys

> Lists all API keys owned by the authenticated user, including workspace associations.



## OpenAPI

````yaml /spec/ai-keys.yaml get /v1/keys
openapi: 3.0.1
info:
  title: AI - API Keys
  description: >-
    Manage API keys for AI workspace access. API keys are used to authenticate
    inference

    requests (chat completions, embeddings, image generation).


    Parameters:

    - `teamID`: To access services in a team (query param or `x-teamid` header)


    Authentication: JWT Bearer token sent via the `Authorization` header.
  termsOfService: '#'
  contact:
    email: info@liara.ir
  version: 1.0.0
servers:
  - url: https://ai.liara.ir
security:
  - jwt: []
tags:
  - name: API Keys
    description: Manage API keys for AI inference
externalDocs:
  description: Find out more about Liara AI
  url: https://liara.ir
paths:
  /v1/keys:
    get:
      tags:
        - API Keys
      summary: List API keys
      description: >-
        Lists all API keys owned by the authenticated user, including workspace
        associations.
      operationId: listKeys
      parameters:
        - name: teamID
          in: query
          description: Team ID for team-scoped keys
          schema:
            type: string
      responses:
        '200':
          description: List of API keys
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KeyResponse'
        '401':
          description: Missing authentication
          content: {}
components:
  schemas:
    KeyResponse:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        workspaces:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
              name:
                type: string
        createdBy:
          type: object
          properties:
            fullname:
              type: string
        lastUsedAt:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    jwt:
      type: apiKey
      description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345"'
      name: Authorization
      in: header

````