Dify Models API

Operations for retrieving available models. 1 operation(s) from the Dify Service API.

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /workspaces/current/models/model-types/{model_type} List available models of a given type · Get Available Models #
Ask an LLM
“Which embedding models can I configure on a Dify knowledge base?”
“What rerank models are available in my workspace?”
Tell an agent
List the available {model_type} models.
Show the models of type {model_type} I can use for knowledge base configuration.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dify:dify-models-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dify-models-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dify Service Models 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. For self-hosted deployments, replace it with your own API base URL.
  variables:
    api_base_url:
      default: api.dify.ai/v1
      description: Host and path of the API base URL, without the `https://` prefix.
security:
- ApiKeyAuth: []
tags:
- name: Models
  description: Operations for retrieving available models.
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
                                - 'null'
                                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
      x-mint:
        href: /en/api-reference/models/get-available-models
        metadata:
          title: Get Available Models
          sidebarTitle: Get Available Models
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/api-reference/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`).'