> ## 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.

# Playground list models

> Lists available models in the playground. Requires `ai.operate` or `ai.manage` permission.
Returns models in OpenAI-compatible format.



## OpenAPI

````yaml /spec/ai-playground.yaml get /api/v1/{workspaceID}/playground/models
openapi: 3.0.1
info:
  title: AI - Playground
  description: >-
    Playground endpoints for testing AI inference with JWT authentication and
    RBAC/DAC authorization.

    These endpoints mirror the API key inference endpoints but require
    user-level permissions.


    Required permissions: `ai.operate` or `ai.manage`


    Parameters:

    - `workspaceID`: The ID of the workspace to use

    - `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: Playground Chat
    description: Playground chat completion endpoints
  - name: Playground Images
    description: Playground image generation and editing endpoints
externalDocs:
  description: Find out more about Liara AI
  url: https://liara.ir
paths:
  /api/v1/{workspaceID}/playground/models:
    get:
      tags:
        - Playground Chat
      summary: Playground list models
      description: >-
        Lists available models in the playground. Requires `ai.operate` or
        `ai.manage` permission.

        Returns models in OpenAI-compatible format.
      operationId: playgroundListModels
      parameters:
        - name: workspaceID
          in: path
          required: true
          description: The workspace ID
          schema:
            type: string
            pattern: ^[a-f0-9]{24}$
      responses:
        '200':
          description: List of models
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        context_length:
                          type: integer
        '401':
          description: Missing authentication
          content: {}
        '403':
          description: Forbidden
          content: {}
components:
  securitySchemes:
    jwt:
      type: apiKey
      description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345"'
      name: Authorization
      in: header

````