Docs · Integrations
Dify with TopxAI: the OpenAI-API-compatible provider
Add each TopxAI model to Dify through the OpenAI-API-compatible provider with endpoint https://ai.topxea.com/v1, your key and the model id.
Dify's OpenAI-API-compatible model provider takes an endpoint URL, a key and a model name per model. Each TopxAI model you want in Dify is one entry.
Add a model
- Settings → Model Provider → OpenAI-API-compatible → Add model.
- Model Type: LLM. Model Name:
claude-sonnet-5-5(exactly as in the catalogue). - API Key: a TopxAI key on the Auto route. API endpoint URL:
https://ai.topxea.com/v1. - Completion mode: Chat. Model context size: the model's window (1050000 for GPT-6.1 Sol, 1000000 for Claude Sonnet 5.5, 1048576 for Kimi K3.1 Pro, 500000 for Grok 4.7). Upper bound for max tokens: the model's output limit.
- Function calling: Tool Call, for agent nodes. Vision: on for the Claude and GPT models, off for
GLM-5.3-Abliterated(text only). - Save; the model appears in the picker of every app.
Repeat for gpt-6.1-sol, grok-4.7, kimi-k3.1-pro and GLM-5.3-Abliterated.
Images
Add gpt-image-2.5-sunburst with Model Type: Text to Image if your Dify version lists that type for the compatible provider; otherwise call /v1/images/generations from an HTTP Request node with the same key.
Workflows and cost
Dify sends the prompt template, the knowledge-base chunks and the conversation with each LLM node. All of it is input tokens at the model's price on the route the key uses; the usage log lists each request with its route and charge.
If it fails
- 401: the key is wrong or was pasted with a space. 402: the balance is empty. 403: the model id is not sold here or is not on this key's route. See Common error responses.
- The model works in curl but not in the tool: that page lists the usual causes, one per tool.
Models: claude-sonnet-5-5, GLM-5.3-Abliterated · Models & pricing
Related
- Connect your SDK
- Create an API key and choose a route
- The model works in curl but not in my tool
- Common error responses
- n8n with TopxAI: an OpenAI credential with a base URL
- LiteLLM with TopxAI: proxy config and the Python SDK
- Claude Sonnet 5.5 API pricing
- GLM-5.3-Abliterated API pricing
Previous: LiteLLM with TopxAI: proxy config and the Python SDK · Next: n8n with TopxAI: an OpenAI credential with a base URL
Other languages: 简体中文