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:
| Setting | Value |
|---|---|
| Provider | OpenAI, or OpenAI-API-compatible if your version shows it |
| API Key | API key, for example tok-... |
| Base URL | https://a.tokener.ca/v1 |
| Model | Platform model name, for example glm-5.3:flash |
Add the Model Provider in Dify
Open your Dify workspace and configure it as follows:
- Open
Settings. - Go to
Model Providers. - Select
OpenAI, orOpenAI-API-compatibleif your version offers it. - Add a new set of credentials.
- Enter your API key for the API Key.
- Enter
https://a.tokener.ca/v1for Custom Base URL or API Base. - 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:
| Field | Value |
|---|---|
| Model Type | LLM or Chat Model |
| Model Name / Model ID | glm-5.3:flash |
| Completion Type | Chat |
| Context Size | Fill in per the model page; if unsure, start with 32768 or 128000 |
| Max Tokens | Start 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:
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:
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
| Symptom | How to Fix |
|---|---|
| Saving credentials fails | Check the API Key, balance, and Base URL |
| Model not in the list | Use the custom model feature to add the platform model ID manually |
404 | Base URL should be https://a.tokener.ca/v1, not the full chat endpoint |
| Workflow run fails | Verify with a plain Chat App first, then check the node's model configuration |
| Knowledge base embedding fails | A chat model can't be used directly as an embedding model; confirm whether an embedding model is available |
