Using in Dify
Leverage the advantages of multiple MyTokenGate models and fast speed to quickly implement workflows/Agents in Dify.
1. Get API Key
- Visit MyTokenGate Website and register an account (or log in if already registered).
- After registration, open API Keys , create a new API Key, and click to copy it for later use.
2. Using MyTokenGate Language Models in Dify
2.1 Using Built-in MyTokenGate Models in Dify
- In Dify, click “Settings” in the top right corner, then select “Model Providers” on the left.
- Find “MyTokenGate”, paste the API Key copied from MyTokenGate platform, and click “Save”.
- After successful verification, you can see MyTokenGate models at the top of the model providers section and use them in your applications.
2.2 Using MyTokenGate Models Not in Dify’s Built-in List
-
Open Dify “Settings”.
-
Select “Model Provider” in the navigation bar, and add a model service platform compatible with OpenAI interface.
-
Configure the Model Name, API Key, and API Endpoint:
- Model Name: Choose from Model List
- API Key: Get from API Keys Page
- API Endpoint URL:
https://gateway.mytokengate.com/v1
-
After configuration, you can see the newly added model in the model list.
3. Using MyTokenGate Image Generation Models in Dify
MyTokenGate supports various image generation models including DALL-E, Stable Diffusion, and more. The configuration steps are similar to language models:
3.1 Add Image Generation Model
- In Dify Settings, go to “Model Providers”.
- Add a model service platform compatible with OpenAI interface.
- Configure the parameters:
- Model Name: e.g.,
dall-e-3,stable-diffusion-xl(see Image Generation Models) - API Key: Get from API Keys Page
- API Endpoint URL:
https://gateway.mytokengate.com/v1
- Model Name: e.g.,
3.2 Use Image Generation Model
After configuration, you can use image generation models in Dify applications:
- Add an “Image Generation” node in your workflow
- Select the configured MyTokenGate image model
- Enter your prompt to generate images
For detailed usage, see Image Generation Models documentation.
Related Links
Last updated on