Integration guides
Using FastGPT
Connecting FastGPT to Tutujin API takes two things — a model channel with the request URL https://open.tutujin.com/v1 and your API key, and the model names enabled in model configuration. Environment variables at deploy time work too.
Connecting FastGPT to Tutujin API takes two steps: tell FastGPT where to send requests and which key to use (the request URL https://open.tutujin.com/v1 plus your Tutujin API key), then enable the models you want in model configuration, with model IDs matching the names in the Tutujin model hub.
Where you configure this differs a lot between FastGPT versions: newer versions manage model channels in the admin pages, older ones use environment variables and config files at deploy time. Pick the method that matches your version. Menu names may differ slightly from what you see.
Method 1: add a model channel in the admin pages
For versions that manage model channels in the web interface:
- Sign in as an admin and open the model provider (or model channel) settings.
- Add a channel with the OpenAI protocol type and fill in:
| Field | Value |
|---|---|
| Channel name | Anything, e.g. "Tutujin" |
| Proxy URL / request URL | https://open.tutujin.com/v1 |
| API key | Your Tutujin API key |
| Models | Select or enter the model names this channel should serve |
- In model configuration, make sure those models are enabled. For a model that is not listed, add a custom model with the model name as its ID, e.g.
deepseek-v4.1-flash. - Save; the models now appear in your apps' AI settings.
Method 2: environment variables at deploy time
If you deploy with docker compose and your version supports these variables, set the default request URL and key on the FastGPT service:
services:
fastgpt:
environment:
- OPENAI_BASE_URL=https://open.tutujin.com/v1
- CHAT_API_KEY=sk-your-keyRestart FastGPT, then enable the models you need in model configuration, with IDs matching the model hub names.
Embedding models for knowledge bases
FastGPT knowledge bases need an embedding model. In model configuration, add or enable an embedding (index) model such as text-embedding-3-small; it uses the same channel as your chat models. Once a knowledge base exists, avoid switching embedding models, or you will have to re-embed all of its data.
Testing and billing
Send a message from an app; a normal reply means the setup works. Every call is recorded under Usage in the Tutujin console and billed at the key's group price. A dedicated key for FastGPT with a spending limit is a good idea.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Model test fails or 404 | The request URL needs /v1; it should be https://open.tutujin.com/v1 |
| 401 | Wrong or invalid key |
503 with model_not_found | The model ID is misspelled, or the key's group lacks the model — see Choosing a group |
| Knowledge-base import errors | Make sure an embedding model is enabled with the correct ID |
Still stuck? Add our WeChat support JsnonoChat and send the request id from the error message, and we will look into it.