Skip to content
Home

Dify

Dify can call OdiRouter through an OpenAI-API-compatible model provider. Use this for Dify chat apps, agents, and workflows that need OdiRouter LLM models.

RequirementValue
DifyCloud or self-hosted workspace with model provider access
Provider typeOpenAI-API-compatible
API endpointhttps://www.odirouter.ai/v1
API KeyOdiRouter API key
Model nameAn OdiRouter LLM model ID
  1. Open Dify.
  2. Go to model provider settings.
  3. Add a provider of type OpenAI-API-compatible.
  4. Set the API endpoint or Base URL to https://www.odirouter.ai/v1.
  5. Paste your OdiRouter API key.
  6. Add an OdiRouter model ID, such as gpt-5.5.
  7. Save and test the provider.
  1. Open a Dify app.
  2. Go to model settings.
  3. Select the OdiRouter provider.
  4. Select the configured model.
  5. Run a short test prompt.

Example prompt:

Reply with one sentence confirming that Dify is using OdiRouter.

When Dify calls OdiRouter as an LLM provider, the app node usually passes the model text as that node’s output to downstream nodes. If you call chat completions directly from an HTTP request node, the assistant text is at:

choices[0].message.content

In workflows, save this field as a clear variable such as answer, summary, or model_output, then pass it to condition nodes, templates, database writes, or webhook responses.

For OdiRouter asynchronous image, video, audio, or 3D models, use Dify’s HTTP request capability instead of the OpenAI-compatible LLM provider:

StepEndpoint
Create taskPOST https://www.odirouter.ai/model/v1/queue/{endpoint}
Poll statusGET {status_url}
Fetch resultGET {response_url}

After creating the task, save these fields:

FieldPurpose
request_idKeep the task ID for logs, debugging, and business records
status_urlPass to a loop or scheduled HTTP node to poll status
response_urlFetch the final result after completion

Poll status_url until status is COMPLETED, then call response_url. The final result shape depends on the model type and usually contains image, video, audio, 3D file URLs, or text fields. Map the needed URL or text field into a workflow variable before passing it downstream.

SymptomFix
Provider test fails with 401Recreate the OdiRouter API key
Model not foundAdd the exact model ID returned by /models
Dify expects a full OpenAI endpointUse https://www.odirouter.ai/v1, not /chat/completions, unless Dify explicitly asks for the full chat endpoint
Multimodal model does not work in LLM providerUse HTTP workflow nodes and the /model/v1/queue/{endpoint} API