POST /v1/chat/completions.
Before you start
You need a NagaAI API key and Dify 1.0 or later, either Dify Cloud or a self-hosted instance with outbound HTTPS access toapi.naga.ac.
Connect Dify
1
Install the plugin
In Dify, open Plugins, find NagaAI in the Marketplace and install it. You can also start from the plugin page.
2
Add the key
Open Settings > Model Provider > NagaAI, paste the API key and save. Dify checks the key with a request to the model list, which isn’t billed.
3
Pick a model
In an LLM node, a chatflow or an agent, open the model picker and choose a NagaAI model. The plugin ships four models with their limits filled in.
Each of them supports tool calling, image input, structured output and a Reasoning effort setting from
none to max. NagaAI runs the nearest level the model supports.Add another model
Choose Add Model on the NagaAI provider and enter the model id exactly asGET /v1/models lists it. Set the context size from limits.context_window of the model’s chat operation in the same list, and turn on tool calling and vision only if the model’s entry lists them. The list needs no key.
What each request cost is in Logs in your dashboard.
Troubleshooting
Dify rejects the key when you save it
Dify couldn’t read the model list with this key. Check that you pasted an API key from the dashboard, with no spaces around it. On a self-hosted instance, also check that the server can reachhttps://api.naga.ac on port 443.
400 model_not_found
No model has the id you added. Copy the id from GET /v1/models, including the vendor prefix, such as anthropic/claude-sonnet-5.5.