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

# Get Available Models

> Returns the available models of a given type. Use it to find the `text-embedding` and `rerank` models to configure on a knowledge base.



## OpenAPI

````yaml /en/3.11.x/develop/api/openapi_service.json get /workspaces/current/models/model-types/{model_type}
openapi: 3.0.1
info:
  title: Dify Service API
  description: >-
    REST API for Dify applications and knowledge bases. Application endpoints
    authenticate with an app API key; knowledge endpoints authenticate with a
    dataset API key.
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: >-
      Base URL of the Dify Service API. Replace it with your deployment's API
      endpoint.
    variables:
      api_base_url:
        default: api.example.com/v1
        description: Host and path of the API base URL, without the `https://` prefix.
security:
  - ApiKeyAuth: []
tags:
  - name: Chat Messages
    description: Operations related to chat messages and interactions.
  - name: Files
    description: File upload and preview operations.
  - name: End Users
    description: Operations related to end user information.
  - name: Feedback
    description: User feedback operations.
  - name: Conversations
    description: Operations related to managing conversations.
  - name: Audio
    description: Text-to-Speech and Speech-to-Text operations.
  - name: Applications
    description: Operations to retrieve application settings and information.
  - name: Annotations
    description: Operations related to managing annotations for direct replies.
  - name: Human Input
    description: Endpoints for resuming paused workflows that require human input.
  - name: Workflow Runs
    description: Operations for executing and managing workflows.
  - name: Completion Messages
    description: Operations related to text generation and completion.
  - name: Knowledge Bases
    description: >-
      Operations for managing knowledge bases, including creation,
      configuration, and retrieval.
  - name: Documents
    description: >-
      Operations for creating, updating, and managing documents within a
      knowledge base.
  - name: Chunks
    description: Operations for managing document chunks and child chunks.
  - name: Metadata
    description: >-
      Operations for managing knowledge base metadata fields and document
      metadata values.
  - name: Tags
    description: Operations for managing knowledge base tags and tag bindings.
  - name: Models
    description: Operations for retrieving available models.
  - name: Knowledge Pipeline
    description: >-
      Operations for managing and running knowledge pipelines, including
      datasource plugins and pipeline execution.
paths:
  /workspaces/current/models/model-types/{model_type}:
    get:
      tags:
        - Models
      summary: Get Available Models
      description: >-
        Returns the available models of a given type. Use it to find the
        `text-embedding` and `rerank` models to configure on a knowledge base.
      operationId: getAvailableModels
      parameters:
        - name: model_type
          in: path
          required: true
          schema:
            type: string
            enum:
              - text-embedding
              - rerank
              - llm
              - tts
              - speech2text
              - moderation
          description: >-
            Type of model to retrieve. For knowledge base configuration, use
            `text-embedding` for embedding models or `rerank` for reranking
            models.
      responses:
        '200':
          description: Available models for the specified type.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of model providers with their available models.
                    items:
                      type: object
                      properties:
                        provider:
                          type: string
                          description: >-
                            Model provider identifier, formatted as
                            `organization/plugin_name/provider_name` (e.g.
                            `langgenius/openai/openai`). Legacy providers may
                            return the bare short form (e.g. `openai`).
                        label:
                          type: object
                          description: Localized display name of the provider.
                          properties:
                            en_US:
                              type: string
                              description: English display name.
                            zh_Hans:
                              type: string
                              description: Chinese display name.
                        icon_small:
                          type: object
                          description: URL of the provider's small icon.
                          properties:
                            en_US:
                              type: string
                              description: Small icon URL.
                            zh_Hans:
                              type: string
                              description: Chinese icon URL.
                        status:
                          type: string
                          description: >-
                            Provider status. `active` when credentials are
                            configured and valid.
                        models:
                          type: array
                          description: List of available models from this provider.
                          items:
                            type: object
                            properties:
                              model:
                                type: string
                                description: >-
                                  Model identifier. Use this as the
                                  `embedding_model` value when creating or
                                  updating a knowledge base.
                              label:
                                type: object
                                description: Localized display name of the model.
                                properties:
                                  en_US:
                                    type: string
                                    description: English model name.
                                  zh_Hans:
                                    type: string
                                    description: Chinese model name.
                              model_type:
                                type: string
                                description: >-
                                  Type of the model, matching the `model_type`
                                  path parameter.
                              features:
                                type: array
                                nullable: true
                                description: >-
                                  Supported features of the model, `null` if
                                  none.
                                items:
                                  type: string
                              fetch_from:
                                type: string
                                description: >-
                                  Where the model definition comes from.
                                  `predefined-model` for built-in models,
                                  `customizable-model` for user-configured
                                  models.
                              model_properties:
                                type: object
                                description: >-
                                  Model-specific properties such as
                                  `context_size`.
                              status:
                                type: string
                                description: >-
                                  Model availability status. `active` when ready
                                  to use.
                              deprecated:
                                type: boolean
                                description: Whether the model is deprecated.
                              load_balancing_enabled:
                                type: boolean
                                description: >-
                                  Whether load balancing is enabled for the
                                  model.
                              has_invalid_load_balancing_configs:
                                type: boolean
                                description: >-
                                  Whether the model has invalid load-balancing
                                  configurations.
                        tenant_id:
                          type: string
                          description: Workspace ID the provider configuration belongs to.
                        icon_small_dark:
                          type: object
                          description: >-
                            Dark-mode icon URLs; `null` when the provider has
                            none.
                          properties:
                            en_US:
                              type: string
                            zh_Hans:
                              type: string
              examples:
                success:
                  summary: Response Example
                  value:
                    data:
                      - provider: langgenius/openai/openai
                        label:
                          en_US: OpenAI
                          zh_Hans: OpenAI
                        icon_small:
                          en_US: https://example.com/openai-small.svg
                          zh_Hans: https://example.com/openai-small.svg
                        status: active
                        models:
                          - model: text-embedding-3-small
                            label:
                              en_US: text-embedding-3-small
                              zh_Hans: text-embedding-3-small
                            model_type: text-embedding
                            features: null
                            fetch_from: predefined-model
                            model_properties:
                              context_size: 8191
                            status: active
                            deprecated: false
                            load_balancing_enabled: false
                            has_invalid_load_balancing_configs: false
                        tenant_id: 11223344-5566-7788-99aa-bbccddeeff00
                        icon_small_dark: null
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        Every request authenticates with an API key: `Authorization: Bearer
        {API_KEY}`. App endpoints take an app API key; knowledge endpoints take
        a knowledge base API key ([Get
        Started](/en/3.11.x/develop/api/guides/get-started)).


        Keep keys server-side; never embed them in client code. Requests with a
        missing or invalid key fail with HTTP `401` (`unauthorized`).

````