Connect Dify to EXAIV: OpenAI-Compatible Provider Setup
Configure EXAIV as an OpenAI-API-compatible model provider in Dify: endpoint URL and key fields, manually adding models, and fixes for common 401/404 errors.
Connect Dify to EXAIV: OpenAI-Compatible Provider Setup
Dify is the most popular open-source LLM app platform — RAG, workflows, and agents all need a text-generation model attached. EXAIV's OpenAI-compatible endpoint plugs in as a Dify model provider with zero code. This guide gives field-level configuration and a verification loop.
Prerequisites
- A Dify instance (cloud or self-hosted)
- An EXAIV API key (generate in the console after registering)
- The model IDs you want, e.g.
qwen3.8-flash,deepseek-v4-flash(full list on the models page)
Configuration steps
Open model provider settings
Avatar menu → Settings → Model Provider.Install OpenAI-API-compatible
Find "OpenAI-API-compatible" in the provider list and install it.Fill in credentials
Model Name: the model ID (e.g.qwen3.8-flash); API Key: your EXAIV key; API endpoint URL:https://exaiv.com/api/ai/v1.Save and use
Save, then pick the model in any app's model selector.
Add multiple models
The compatible provider supports several model names under one config. Add your chat, reasoning, and long-context models so apps can switch per task — all billed under the same key.
Verify
Create a chat assistant, select the newly added model, send a message. A normal reply confirms the setup. Then run a RAG/knowledge-retrieval app to confirm context injection works end to end.
Common issues
| Symptom | Fix |
|---|---|
| 401 | Check the key was copied fully; on Dify Cloud, confirm the endpoint is reachable from their network |
| 404 | Endpoint URL has extra/missing path — the standard EXAIV base is https://exaiv.com/api/ai/v1 |
| Empty model list | Compatible providers require manual model names; nothing auto-populates |
| Empty replies | Check the model ID spelling against the models page |
Advanced: multi-model workflows
Once the provider is configured, Dify's real power is routing tasks to different models inside a workflow:
- Intent classification on a cheap fast model (qwen flash tiers), reserving premium capacity for the main task
- Main generation on a flagship model for output quality
- Summarization/rewriting intermediate steps back on low-cost models
A customer-service workflow built this way can cost well under half of an all-flagship setup. Live per-tier credit rates are visible on the models page — assign models by cost-performance when orchestrating.
Team practices
- Give each app its own model configuration so changes don't bleed across apps
- Before launch, run a real evaluation dataset (Dify's built-in datasets) to confirm quality after any model switch
- Watch per-app credit consumption in the EXAIV console to catch anomalies early
A worked cost example
Consider a customer-support classifier handling 10,000 conversations a day, with roughly 2,000 input tokens and 300 output tokens each. Monthly volume lands around 600M input and 90M output tokens.
Multiply those totals by whatever rate the chosen model shows on the models page and you have the monthly credit figure — the same arithmetic this page's calculator-style reasoning uses, just per workload. The design lever is model assignment: classification on a flash-tier model versus a flagship changes the result severalfold, which is why the workflow-router pattern matters more than any single price tag.
EXAIV meters exactly this way — per model, per token, deducted from one credit balance — so the numbers you estimate here match the console's accounting line for line.