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

# 利用可能なモデルを取得

> タイプ別に利用可能なモデルの一覧を取得します。主にナレッジベース設定用の `text-embedding` モデルと `rerank` モデルのクエリに使用します。



## OpenAPI

````yaml /ja/api-reference/openapi_knowledge.json get /workspaces/current/models/model-types/{model_type}
openapi: 3.0.1
info:
  title: ナレッジAPI
  description: >-
    ナレッジベース、ドキュメント、チャンク、メタデータ、タグの管理（作成、取得、設定を含む）のための API です。**注意：**単一のナレッジベース
    API キーは、同じアカウント配下のすべての可視ナレッジベースを操作する権限を持ちます。データセキュリティにご注意ください。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Knowledge API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: データセット
    description: ナレッジベースの作成、設定、取得を含むナレッジベース管理の操作です。
  - name: ドキュメント
    description: ナレッジベース内のドキュメントの作成、更新、管理のための操作です。
  - name: チャンク
    description: ドキュメントチャンクと子チャンクの管理のための操作です。
  - name: メタデータ
    description: ナレッジベースのメタデータフィールドとドキュメントメタデータ値の管理のための操作です。
  - name: タグ管理
    description: ナレッジベースタグとタグバインディングの管理のための操作です。
  - name: モデル
    description: 利用可能なモデルを取得するための操作です。
  - name: ナレッジパイプライン
    description: データソースプラグインとパイプライン実行を含むナレッジパイプラインの管理と実行のための操作です。
paths:
  /workspaces/current/models/model-types/{model_type}:
    get:
      tags:
        - モデル
      summary: 利用可能なモデルを取得
      description: >-
        タイプ別に利用可能なモデルの一覧を取得します。主にナレッジベース設定用の `text-embedding` モデルと `rerank`
        モデルのクエリに使用します。
      operationId: getAvailableModelsJa
      parameters:
        - name: model_type
          in: path
          required: true
          schema:
            type: string
            enum:
              - text-embedding
              - rerank
              - llm
              - tts
              - speech2text
              - moderation
          description: >-
            取得するモデルのタイプです。ナレッジベースの設定には、埋め込みモデルの場合は
            `text-embedding`、リランキングモデルの場合は `rerank` を使用します。
      responses:
        '200':
          description: 指定された種類で利用可能なモデルです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 利用可能なモデルを持つモデルプロバイダーのリストです。
                    items:
                      type: object
                      properties:
                        provider:
                          type: string
                          description: モデルプロバイダーの識別子です（例：`openai`、`cohere`）。
                        label:
                          type: object
                          description: プロバイダーのローカライズ表示名です。
                          properties:
                            en_US:
                              type: string
                              description: 英語表示名。
                            zh_Hans:
                              type: string
                              description: 中国語表示名。
                        icon_small:
                          type: object
                          description: プロバイダーの小アイコンの URL です。
                          properties:
                            en_US:
                              type: string
                              description: 小アイコン URL。
                        icon_large:
                          type: object
                          description: プロバイダーの大アイコンの URL です。
                          properties:
                            en_US:
                              type: string
                              description: 大アイコン URL。
                        status:
                          type: string
                          description: プロバイダーのステータスです。認証情報が設定済みで有効な場合は `active` です。
                        models:
                          type: array
                          description: このプロバイダーから利用可能なモデルのリストです。
                          items:
                            type: object
                            properties:
                              model:
                                type: string
                                description: >-
                                  モデル識別子です。ナレッジベースの作成または更新時に `embedding_model`
                                  の値として使用します。
                              label:
                                type: object
                                description: モデルのローカライズ表示名です。
                                properties:
                                  en_US:
                                    type: string
                                    description: 英語モデル名。
                                  zh_Hans:
                                    type: string
                                    description: 中国語モデル名。
                              model_type:
                                type: string
                                description: モデルのタイプです。`model_type` パスパラメータと一致します。
                              features:
                                type: array
                                nullable: true
                                description: モデルがサポートする機能です。なしの場合は `null` です。
                                items:
                                  type: string
                              fetch_from:
                                type: string
                                description: >-
                                  モデル定義の取得元です。`predefined-model`
                                  は組み込みモデル、`customizable-model` はユーザー設定モデルを示します。
                              model_properties:
                                type: object
                                description: '`context_size` などのモデル固有のプロパティです。'
                              status:
                                type: string
                                description: モデルの利用可能ステータスです。使用可能な場合は `active` です。
              examples:
                success:
                  summary: レスポンス例
                  value:
                    data:
                      - provider: openai
                        label:
                          en_US: OpenAI
                          zh_Hans: OpenAI
                        icon_small:
                          en_US: https://example.com/openai-small.svg
                        icon_large:
                          en_US: https://example.com/openai-large.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
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer `
        プレフィックスを付けた API Key を含めてください。例：`Authorization: Bearer {API_KEY}`。**API
        Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key
        の漏洩は深刻な結果につながる可能性があります。**

````