Sign inSign up
DocsDify Integration

Dify Integration

Integrate Tokener CA in a Dify workspace through an OpenAI-compatible model provider.

Updated:

When to Use

Dify is a platform for building apps and orchestrating workflows and agents. Once you integrate Tokener CA into Dify, you can use platform models in chat apps, Workflows, Agents, and knowledge base pipelines.

Integrate Tokener CA as an OpenAI-compatible model provider using the steps below.

Configure the OpenAI-Compatible Provider

We recommend configuring Tokener CA as an OpenAI-compatible provider in Dify:

SettingValue
ProviderOpenAI, or OpenAI-API-compatible if your version shows it
API KeyAPI key, for example tok-...
Base URLhttps://a.tokener.ca/v1
ModelPlatform model name, for example glm-5.3:flash

Add the Model Provider in Dify

Open your Dify workspace and configure it as follows:

  1. Open Settings.
  2. Go to Model Providers.
  3. Select OpenAI, or OpenAI-API-compatible if your version offers it.
  4. Add a new set of credentials.
  5. Enter your API key for the API Key.
  6. Enter https://a.tokener.ca/v1 for Custom Base URL or API Base.
  7. Save and test the connection.

Dify validates the credentials when you save. If validation fails, first run the curl at the end of this article with the same key and model to confirm that the platform-side call already works.

Add or Select a Model

If the Tokener CA model ID isn't in Dify's model list, you'll need to add a custom model manually.

Suggested fields:

FieldValue
Model TypeLLM or Chat Model
Model Name / Model IDglm-5.3:flash
Completion TypeChat
Context SizeFill in per the model page; if unsure, start with 32768 or 128000
Max TokensStart with 4096 or 8192

After adding it, select the model in your app's model picker.

Use It in an App

Create or open a Dify App and select the Tokener CA model you just integrated in the model configuration. We recommend testing with the simplest Chat App first:

Text
In one sentence, confirm that this app has been integrated with Tokener CA.

Once the test passes, use it in Workflows, Agents, tool calling, or knowledge base Q&A.

Verify the API

If Dify configuration fails, first verify the same key and model from a terminal:

Bash
curl -X POST "https://a.tokener.ca/v1/chat/completions" \  -H "Authorization: Bearer <consumer_api_key>" \  -H "Content-Type: application/json" \  --data-raw '{    "model": "glm-5.3:flash",    "messages": [      {        "role": "user",        "content": "Return a short message confirming the integration works."      }    ],    "max_tokens": 64,    "stream": false  }'

Troubleshooting Checklist

SymptomHow to Fix
Saving credentials failsCheck the API Key, balance, and Base URL
Model not in the listUse the custom model feature to add the platform model ID manually
404Base URL should be https://a.tokener.ca/v1, not the full chat endpoint
Workflow run failsVerify with a plain Chat App first, then check the node's model configuration
Knowledge base embedding failsA chat model can't be used directly as an embedding model; confirm whether an embedding model is available

References