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

# List all candidate models under the given credential type

> Return all candidate models under the given credential type.

Args:
    body (ListModelsRequest): The request body.

Returns:
    `ListModelsResponse`: The response body.



## OpenAPI

````yaml /versions/2.0.2/en/deploy/openapi.json get /model/
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.1
servers: []
security: []
paths:
  /model/:
    get:
      tags:
        - model
      summary: List all candidate models under the given credential type
      description: |-
        Return all candidate models under the given credential type.

        Args:
            body (ListModelsRequest): The request body.

        Returns:
            `ListModelsResponse`: The response body.
      operationId: list_models_model__get
      parameters:
        - name: provider
          in: query
          required: true
          schema:
            type: string
            title: Provider
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListModelsResponse:
      properties:
        models:
          items:
            $ref: '#/components/schemas/ModelCard'
          type: array
          title: Models
          description: The candidate models.
        total:
          type: integer
          title: Total
          description: The total number of candidates.
      type: object
      required:
        - models
        - total
      title: ListModelsResponse
      description: List the candidate models response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModelCard:
      properties:
        type:
          type: string
          const: chat_model
          title: Type
          default: chat_model
        name:
          type: string
          title: Name
          description: The name of the model
        label:
          type: string
          title: Label
          description: The model label.
        status:
          type: string
          enum:
            - active
            - deprecated
            - sunset
          title: Status
          description: The model status
        deprecated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deprecation date
          description: The model deprecation date and time.
        input_types:
          items:
            type: string
          type: array
          title: Input types
          description: The supported model input types.
          default:
            - text/plain
        output_types:
          items:
            type: string
          type: array
          title: Output types
          description: The supported model output types.
          default:
            - text/plain
        context_size:
          type: integer
          exclusiveMinimum: 0
          title: Context size
          description: The context size.
        output_size:
          type: integer
          exclusiveMinimum: 0
          title: Max output tokens
          description: The maximum number of tokens.
        parameter_schema:
          additionalProperties: true
          type: object
          title: Parameter Schema
        parameters_overrides:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Parameters Overrides
      type: object
      required:
        - name
        - label
        - status
        - context_size
        - output_size
        - parameter_schema
        - parameters_overrides
      title: ModelCard
      description: The model card class.
    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

````