> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-fix-template-upload-size-guidance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取应用参数

> **适用于**：Chatflow、Workflow、Agent、聊天助手、旧版 Agent、文本生成应用。

返回应用的前端配置：开场白和建议问题、功能开关、用户输入表单，以及文件上传限制。用它来渲染应用的输入项并应用正确的上传限制。



## OpenAPI

````yaml /zh/api-reference/openapi_service.json get /parameters
openapi: 3.0.1
info:
  description: 用于 Dify 应用与知识库的 REST API。应用类接口使用应用 API 密钥认证，知识库类接口使用知识库 API 密钥认证。
  title: Dify 服务 API
  version: 1.0.0
servers:
  - description: Dify 服务 API 的基础 URL。自部署时，替换为你的 API 基础 URL。
    url: https://{api_base_url}
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API 基础 URL 的主机与路径，不含 `https://` 前缀。
security:
  - ApiKeyAuth: []
tags:
  - description: 与聊天消息和交互相关的操作。
    name: 对话消息
  - description: 文件上传和预览操作。
    name: 文件操作
  - description: 终端用户信息相关操作。
    name: 终端用户
  - description: 用户反馈操作。
    name: 消息反馈
  - description: 与管理会话相关的操作。
    name: 会话管理
  - description: 文字转语音和语音转文字操作。
    name: 语音与文字转换
  - description: 获取应用设置和信息的操作。
    name: 应用配置
  - description: 与管理标注直接回复相关的操作。
    name: 标注管理
  - description: 暂停等待人工输入的工作流恢复操作。
    name: 人工介入
  - description: 用于执行和管理工作流的操作。
    name: 工作流运行
  - description: 文本生成相关操作。
    name: 文本生成消息
  - description: 用于管理知识库的操作，包括创建、配置和检索。
    name: 知识库
  - description: 用于在知识库中创建、更新和管理文档的操作。
    name: 文档
  - description: 用于管理分段和子分段的操作。
    name: 分段
  - description: 用于管理知识库元数据字段和文档元数据值的操作。
    name: 元数据
  - description: 用于管理知识库标签和标签绑定的操作。
    name: 标签
  - description: 用于获取可用模型的操作。
    name: 模型
  - description: 用于管理和运行知识流水线的操作，包括数据源插件和流水线执行。
    name: 知识流水线
paths:
  /parameters:
    get:
      tags:
        - 应用配置
      summary: 获取应用参数
      description: |-
        **适用于**：Chatflow、Workflow、Agent、聊天助手、旧版 Agent、文本生成应用。

        返回应用的前端配置：开场白和建议问题、功能开关、用户输入表单，以及文件上传限制。用它来渲染应用的输入项并应用正确的上传限制。
      operationId: getBasicChatAppParametersCn
      responses:
        '200':
          content:
            application/json:
              examples:
                appParameters:
                  summary: 响应示例
                  value:
                    annotation_reply:
                      enabled: false
                    file_upload:
                      image:
                        detail: high
                        enabled: true
                        number_limits: 3
                        transfer_methods:
                          - remote_url
                          - local_file
                    more_like_this:
                      enabled: false
                    opening_statement: Hello! How can I help you today?
                    retriever_resource:
                      enabled: true
                    sensitive_word_avoidance:
                      enabled: false
                    speech_to_text:
                      enabled: false
                    suggested_questions:
                      - What can you do?
                      - Tell me about your features.
                    suggested_questions_after_answer:
                      enabled: true
                    system_parameters:
                      audio_file_size_limit: 50
                      file_size_limit: 15
                      image_file_size_limit: 10
                      video_file_size_limit: 100
                      workflow_file_upload_limit: 10
                    text_to_speech:
                      autoPlay: disabled
                      enabled: false
                      language: en-US
                      voice: alloy
                    user_input_form:
                      - text-input:
                          default: ''
                          label: City
                          required: true
                          variable: city
              schema:
                $ref: '#/components/schemas/AppParametersResponse'
          description: 应用参数信息。
        '400':
          content:
            application/json:
              examples:
                agent_not_published:
                  summary: agent_not_published
                  value:
                    code: agent_not_published
                    message: >-
                      Agent has not been published. Please publish the Agent
                      before using the API.
                    status: 400
                app_unavailable:
                  summary: app_unavailable
                  value:
                    code: app_unavailable
                    message: App unavailable, please check your app configurations.
                    status: 400
          description: |-
            - `app_unavailable` : 应用不可用或配置错误。
            - `agent_not_published` : 应用的 Agent 尚无已发布版本。（Agent 应用）
components:
  schemas:
    AppParametersResponse:
      properties:
        annotation_reply:
          description: 标注回复功能配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        file_upload:
          description: 文件上传配置。
          properties:
            image:
              properties:
                detail:
                  description: 视觉模型的图像细节级别。
                  type: string
                enabled:
                  description: 是否启用图片上传。
                  type: boolean
                number_limits:
                  description: 可上传的最大图片数量。
                  type: integer
                transfer_methods:
                  description: >-
                    图片上传允许的传输方式。`remote_url` 表示通过文件 URL 上传，`local_file`
                    表示上传本地文件。
                  items:
                    type: string
                  type: array
              type: object
          type: object
        more_like_this:
          description: 更多类似推荐功能配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        opening_statement:
          description: 开场白文本。
          nullable: true
          type: string
        retriever_resource:
          description: 知识检索引用资源配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        sensitive_word_avoidance:
          description: 内容审核功能配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        speech_to_text:
          description: 语音转文字功能配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        suggested_questions:
          description: 建议问题列表。
          items:
            type: string
          type: array
        suggested_questions_after_answer:
          description: 回答后建议问题的配置。
          properties:
            enabled:
              description: 是否启用此功能。
              type: boolean
          type: object
        system_parameters:
          description: 系统级参数限制。
          properties:
            audio_file_size_limit:
              description: 最大音频文件大小（MB）。
              type: integer
            file_size_limit:
              description: 常规文件最大大小（MB）。
              type: integer
            image_file_size_limit:
              description: 最大图片文件大小（MB）。
              type: integer
            video_file_size_limit:
              description: 最大视频文件大小（MB）。
              type: integer
            workflow_file_upload_limit:
              description: 每次工作流执行的最大文件数量。
              type: integer
          type: object
        text_to_speech:
          description: 文字转语音功能配置。
          properties:
            autoPlay:
              description: 自动播放设置。`enabled` 为自动播放音频，`disabled` 为需要手动播放。
              type: string
            enabled:
              description: 是否启用此功能。
              type: boolean
            language:
              description: TTS 语言。
              type: string
            voice:
              description: TTS 声音标识符。
              type: string
          type: object
        user_input_form:
          description: 用户输入表单配置。
          items:
            oneOf:
              - properties:
                  text-input:
                    properties:
                      default:
                        description: 输入字段的默认值。
                        type: string
                      label:
                        description: 输入字段的显示标签。
                        type: string
                      required:
                        description: 该字段是否必填。
                        type: boolean
                      variable:
                        description: 工作流中使用的变量名称。
                        type: string
                    type: object
                title: Text Input
                type: object
              - properties:
                  paragraph:
                    properties:
                      default:
                        description: 段落字段的默认值。
                        type: string
                      label:
                        description: 段落字段的显示标签。
                        type: string
                      required:
                        description: 该字段是否必填。
                        type: boolean
                      variable:
                        description: 工作流中使用的变量名称。
                        type: string
                    type: object
                title: Paragraph
                type: object
              - properties:
                  select:
                    properties:
                      default:
                        description: 默认选中的值。
                        type: string
                      label:
                        description: 下拉选择字段的显示标签。
                        type: string
                      options:
                        description: 此表单控件的可选值列表。
                        items:
                          type: string
                        type: array
                      required:
                        description: 该字段是否必填。
                        type: boolean
                      variable:
                        description: 工作流中使用的变量名称。
                        type: string
                    type: object
                title: Select
                type: object
            type: object
          type: array
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: API_KEY
      description: >-
        每个请求都通过 API Key 认证：`Authorization: Bearer {API_KEY}`。应用接口使用应用 API
        Key，知识库接口使用知识库 API Key（[快速开始](/zh/api-reference/guides/get-started)）。


        API Key 应保存在服务端，切勿嵌入客户端代码。缺失或无效的 Key 会返回 HTTP `401`（`unauthorized`）。
      scheme: bearer
      type: http

````