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

# Dify

[Dify](https://dify.ai) is an open-source LLM application development platform for building chatbots, agents, and workflows visually. Dify can connect to the ScitiX Model Inference API through the **OpenAI-API-compatible** provider plugin, so Chat, Agent, and Workflow apps can use ScitiX models.

## Configure

Prepare a Dify workspace first. You can use [Dify Cloud](https://cloud.dify.ai) or a [self-hosted deployment](https://docs.dify.ai/en/getting-started/install-self-hosted/docker-compose). The plugin marketplace requires Dify 1.x.

<Note>
  Only workspace **owners** and **admins** can manage model providers. The API Key is shared across the workspace.
</Note>

### 1. Install the provider plugin

1. Open **Integrations → Model Provider** from the left sidebar.
2. In the **Install model providers** list, find **OpenAI-API-compatible** published by *langgenius*, then click **Install**.

   If **OpenAI-API-compatible** does not appear on the first page, use the search box or click **Discover more in Dify Marketplace**.

### 2. Add a ScitiX model

The example below adds `glm-5.2`.

1. On the **OpenAI-API-compatible** provider card, click **Add Model**, fill in the required fields, and save.

   | Field                      | Example                                                                                          |
   | -------------------------- | ------------------------------------------------------------------------------------------------ |
   | Model Type                 | `LLM`                                                                                            |
   | Model Name                 | `glm-5.2`                                                                                        |
   | API Key                    | Your API Key created on the [API Keys](https://console.scitix.ai/model-inference/api_keys) page. |
   | API endpoint URL           | `https://api.scitix.ai/model-api/v1`                                                             |
   | Completion mode            | `Chat`                                                                                           |
   | Model context size         | `131072`                                                                                         |
   | Upper bound for max tokens | `8192`                                                                                           |
   | Function calling           | If the form provides a tool-call option, select it. Agent apps require this capability.          |

   Keep the following in mind:

   * You can keep the Streaming and vision settings at their defaults.
   * The same plugin supports `LLM`, `Text Embedding`, `Rerank`, `Speech2Text`, and `TTS` model types. If your app needs these capabilities, choose the corresponding models from the [model catalog](https://console.scitix.ai/model-inference/models).
   * Agent apps require a model with native tool calling support. `glm-5.2` supports this capability. If you switch models, check the platform's tool-calling model list first.
   * If saving fails, or if the model errors when first used in an app, check that the endpoint URL ends with `/v1` but not `/`, and make sure the API Key has no extra spaces.

2. Set `glm-5.2` as the workspace default model.

   In the top-right corner of the Model Provider page, click **Default Models**. Before you configure the default model, Dify shows a “Configure a default system model” prompt. After the default model is set, apps can use it automatically.

## Verify

Create an app, such as a Chat app in Studio or an agent in the Agents builder. Confirm that the app uses `glm-5.2`, then send a message. A normal streaming reply confirms that the connection works.
