Integration guides
Using n8n
Put your Tutujin API key in an n8n OpenAI credential and change its Base URL to https://open.tutujin.com/v1 to call GPT, Claude, DeepSeek and more from AI Agent, chat model and embedding nodes — or call the API directly with the HTTP Request node.
To connect n8n to Tutujin API, edit an OpenAI credential: use your Tutujin key as the API key and change the Base URL from OpenAI's default to https://open.tutujin.com/v1. Every OpenAI-related node using that credential then sends requests to Tutujin API, and model names are the ones in the model hub.
The steps follow recent n8n versions; node names and field positions may differ slightly in yours.
Step 1: Create a credential
- Open Credentials and create a new OpenAI credential.
- Fill in the following and save:
| Field | Value |
|---|---|
| API Key | Your Tutujin API key |
| Organization ID | Leave empty |
| Base URL | https://open.tutujin.com/v1 |
When you save, n8n fetches the model list with this credential; if it saves, the URL and key are correct.
Step 2: Use it in a workflow
In AI workflows (AI Agent, Basic LLM Chain and so on), attach an OpenAI Chat Model sub-node:
- Set Credential to the credential from step 1.
- Pick Model from the list, which shows the models this key can use, or switch to entering an ID and type a model name such as
deepseek-v4.1-flash. - Set the other options (temperature, max tokens…) as needed.
To embed text, for example when writing documents to a vector store, use the Embeddings OpenAI node with the same credential and an embedding model name such as text-embedding-3-small.
Calling the API with HTTP Request
If you would rather not use AI nodes, or need an endpoint they do not cover, use the HTTP Request node:
| Field | Value |
|---|---|
| Method | POST |
| URL | https://open.tutujin.com/v1/chat/completions |
| Authentication | Generic Credential Type → Header Auth, with Name Authorization and Value Bearer sk-your-key |
| Body | JSON, as below |
{
"model": "deepseek-v4.1-flash",
"messages": [
{ "role": "system", "content": "Classify the customer feedback as shipping, quality, after-sales or other. Output only the category." },
{ "role": "user", "content": "My parcel still hasn't arrived after three days" }
]
}The reply is in choices[0].message.content of the result, ready for later nodes. For other endpoints, change the URL and body; parameters are in the API reference.
Keeping costs under control
Scheduled and batch workflows in n8n can send many requests in a short time. Give n8n its own key with a spending limit, and control batch sizes in loop nodes to avoid rate limits — see Rate limits. The cost of every call is listed under Usage in the console.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| The credential will not save | Check the Base URL is https://open.tutujin.com/v1 and the key is complete |
| The model you want is not in the list | The key's group lacks it; use a key in another group, or enter the ID and test |
| 401 | Wrong or invalid key |
| 429 | The loop sends requests too fast; add a Wait node or smaller batches |
Still stuck? Add our WeChat support JsnonoChat and send the request id from the error message, and we will look into it.