cheapaimodel

Dify

Use cheapaimodel models in Dify apps and workflows through the OpenAI-API-compatible model provider.

Copy

Dify connects to OpenAI-compatible services through the OpenAI-API-compatible model provider plugin. You add each model by hand, and every app in the workspace can then use it.

Dify settingValue
Base URLAPI Base URLhttps://api.cheapaimodel.ai/v1
API keyAPI KeyYour key from the console's API Keys page
Model IDModel Namedeepseek-v4-1-flash, or any ID from the catalog

Set it up

Install the provider

As a workspace owner or admin, open Integrations → Model Provider. Find OpenAI-API-compatible under Install model providers, or in the Dify Marketplace, and install it.

Add a model

On the OpenAI-API-compatible card, select Add Model and fill in:

FieldValue
Model TypeLLM
Model Namedeepseek-v4-1-flash
API KeyYour cheapaimodel key
API Base URLhttps://api.cheapaimodel.ai/v1
Completion modeChat
Model context sizeThe context length on the model's page, for example /models/deepseek-v4-1-flash
Upper bound for max tokensThe maximum output tokens on the same page

Both size fields start at 4096, so set them from the model page. Leave model name for API endpoint empty and API Type on Chat Completions API (/chat/completions). The capability fields, such as Function Call Type and Vision Support, start off; turn one on only for what you've confirmed the model handles.

Select Save. Dify sends a short test request to the model before saving, so a wrong field fails here instead of in your app. Repeat for each model ID you want.

Use it

Pick the model in an app's or LLM node's model selector, or make it the workspace default with Default Models → System Reasoning Model.

Knowledge bases

cheapaimodel has no embeddings models yet. Don't add a Text Embedding model that points at cheapaimodel; set Default Models → Embedding Model to another provider for your knowledge bases.

Common mistakes

  • Save fails with Credentials validation failed with status code 404 and a body of fault filter abort. API Base URL is missing /v1. Set https://api.cheapaimodel.ai/v1.
  • Save fails with status code 404 and Invalid URL (POST /v1/chat/completions/chat/completions) in the body. API Base URL includes the endpoint path. Dify appends /chat/completions itself; set https://api.cheapaimodel.ai/v1.
  • Save fails with status code 401. The key is wrong, expired or out of budget. Check it in the console.
  • Save fails with status code 503 and model_not_found. Model Name must be a catalog ID, spelled exactly. Put a friendlier label in Model display name instead.