Short answer. In Dify, install the OpenAI-API-compatible model provider, click Add API Key, and set API Base URL to
https://api.plugsky.com/v1for chat models. Enter your Plugsky key, add the model nameplugsky-frontierorplugsky-coder, choose type LLM and completion mode Chat, then set context size and max tokens to your plan ceiling. Labels can move between Dify releases; the values do not.
What Dify needs from a model provider
Dify is a model-agnostic orchestration layer. A workflow node, a chatflow answer or an agent step resolves to a provider entry, and Dify sends the request to that provider with the workspace’s stored credential. The provider entry therefore needs four things: a base URL, a key, a model name and a declared model type. Everything else — context size, output limit, streaming, tool use and vision — is metadata that tells Dify how to build and validate the call.
The OpenAI-API-compatible plugin exists for endpoints that speak the OpenAI wire format without being OpenAI. Its documentation describes configuration by type, name, API key and URL, with further options for completion mode, context, token limits, streaming and vision. That is the right route for Plugsky. A direct HTTP Request node also works, but it bypasses Dify’s model abstraction and loses the model list, usage metadata and default-model selection.
Provider management is workspace-wide and restricted to the owner and admins. Every key added to a provider is available to every app in that workspace and bills to the account behind the key. Create separate workspaces or separate keys for development and production, and do not let a prototype workflow share the production key.
Exact Dify settings for Plugsky
The table below maps the documented plugin fields to Plugsky values. Use it as a configuration record, not as a claim that every Dify release renders the same label.
| Dify field | Value | Notes |
|---|---|---|
| Provider | OpenAI-API-compatible | Install from Integrations > Model Provider or the Dify Marketplace. Not the OpenAI provider. |
| Type | LLM | Use the embedding or rerank type only when you are adding an embedding or rerank model. |
| Model Name | plugsky-frontier | Or plugsky-coder, plugsky-reasoning, plugsky-vision-fast. Copy the exact ID from GET /v1/models. |
| API Key | Your Plugsky key | Workspace-wide. Create one key per environment so it can be revoked alone. |
| API Base URL | https://api.plugsky.com/v1 | For chat and LLM models. Include /v1, no trailing slash, no /chat/completions suffix. |
| Completion mode | Chat | The plugin documents a completion mode setting; chat is the mode for Chat Completions models. |
| Context size | 262144 | The model window. Lower it to the plan input ceiling: 64K Hobby, 128K Starter, 256K Builder, 512K Scale. |
| Max tokens | 8192 to 32768 | Hobby 8K, Starter 16K, Builder and Scale 32K output. The model’s own maximum can be lower. |
| Streaming | On | Dify consumes server-sent events. Confirm the final chunk behaviour in your version. |
| Function calling | Off until tested | Enable only after a tool-call test passes. Needed for agent and tool nodes. |
| Vision | Off for text models | Enable only for plugsky-vision-fast, plugsky-qwen-vl or plugsky-gemma-4. |
| Extra headers | None | Plugsky authenticates with the bearer key. Add a header only if your account documentation requires one. |
Host note. This guide uses
https://api.plugsky.com/v1, the approved API host. Plugsky’s public documentation also showshttps://plugsky.com/v1in examples. Both hosts answeredGET /v1/modelson 20 November 2026, but they are different hostnames. Pick one and keep it across Dify workspaces, scripts and environments.
Add the provider and model step by step
- Install the provider. Open Integrations > Model Provider, find Install model providers, and install OpenAI-API-compatible. On older self-hosted builds the route may be Settings > Model Provider.
- Add the key. Click Add API Key on the provider card. Paste the Plugsky key and the base URL from the table.
- Declare the model. Add the model name, choose LLM, and set context and output limits. Dify validates the credential before making the provider available; a failed validation usually means the key, URL or model name is wrong.
- Set the default. Open Default Models and choose the Plugsky model as the System Reasoning Model if you want workflows that do not name a model to use it.
- Build one node. Create a Chatflow, add an LLM node, select the model and run a single-turn prompt. Do not start with an agent, a loop or a knowledge base.
- Promote the key. When the test passes, replace the development key with the production key and record the model ID in your deployment configuration.
The documented path was checked on 20 November 2026. Dify moves navigation labels between releases, so if a menu name does not match, search the documentation index for the current provider page rather than guessing a new route.
Smoke test before you build a workflow
Test the endpoint outside Dify first. If this request fails, the problem is the host, key or model ID, not the workflow.
curl https://api.plugsky.com/v1/chat/completions \
-H "Authorization: Bearer $PLUGSKY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "plugsky-frontier",
"messages": [{"role": "user", "content": "Reply with the single word ready."}],
"max_tokens": 16
}'A JSON response with a choices array proves the credential and model name. Then repeat the same prompt inside the Dify LLM node and inspect the run log. The log should show the model name and token usage; if it shows a different provider or model, the node is still pointing at the default model rather than the entry you added.
For a workflow that will use tools, test the tool path separately. Dify’s agent and tool nodes depend on OpenAI-style function calling, and a model that answers in prose instead of returning tool_calls will fail silently or loop. Enable function calling on the model entry only after that test passes.
Embeddings and knowledge bases
Dify’s RAG features need an embedding model as well as a chat model. Plugsky publishes three embedding IDs: plugsky-embed, plugsky-embed-nim and plugsky-embed-multilingual. Each returns 2,048-dimension vectors and accepts up to 8,192 input tokens. Confirm that your Dify knowledge base accepts 2,048 dimensions before you ingest documents; changing the embedding model later means reindexing the whole knowledge base.
The plugin README notes an important path difference: for non-LLM model types such as text embedding, the plugin may append the API version internally, so the base URL should be https://api.plugsky.com without /v1 to avoid a duplicated path. That behaviour is documented for the plugin, but it is not specific to Plugsky and was not run-tested for this page. Test one embedding request before you load a corpus.
RAG pipeline: test retrieval before the answer
A Dify knowledge base is only as good as the chunks it retrieves. If the right passage is not in the top results, a better prompt cannot recover it. Build the knowledge base before the chat app and evaluate retrieval on its own.
- Index a representative set. Use
plugsky-embedat 2,048 dimensions, upload documents that look like production content, and wait for indexing to finish. - Inspect the top chunks. Ask ten questions whose answers you know, then read the retrieved text, score and metadata. A plausible answer built on the wrong chunk is a retrieval failure, not a model success.
- Constrain the answer. Instruct the LLM node to answer only from retrieved context and to say when the context is insufficient. Keep source names and stable IDs so a reviewer can open the original.
- Evaluate separately. Score retrieval (was the right passage found?) and generation (was the answer supported?) as two metrics. Dify’s logs show both stages; a single “good answer” review hides which one failed.
Reranking is optional and currently external. Plugsky’s published catalogue has no dedicated rerank model, so use hybrid or weighted retrieval, install a separate rerank provider in Dify, or rerank in your own service before the workflow. Do not use a chat model as a reranker; the interface and the scoring behaviour are different.
Errors, causes and first fixes
Read the HTTP status first, then the structured error body. Do not branch on the human-readable message, which can change without notice.
| Symptom | Likely cause | First fix |
|---|---|---|
| 401 Unauthorized | OpenAI key left in the field, revoked key or wrong host | Paste the Plugsky key again and confirm the base URL points at api.plugsky.com. |
| 403 Forbidden | Key scope or plan does not include the surface | Check the key role and the plan; use a key from the workspace that owns the model access. |
| 404 Not Found | Base URL already ends in /chat/completions, or model ID is unknown | Use https://api.plugsky.com/v1 and an ID from GET /v1/models. |
| 400 Bad Request | Malformed message array, bad parameter or context overflow | Validate the message roles; trim input or lower max tokens when the error reports token counts. |
| 413 Payload Too Large | Document or prompt exceeds the request body limit | Chunk the document or reduce the number of messages per call. |
| 429 Too Many Requests | RPM, concurrency or daily quota exhausted | Honour Retry-After, add jittered backoff and reduce parallel workflow branches. |
| 500–503 | Server or upstream failure, possibly during failover | Retry with backoff; check the status page before changing the workflow. |
| Credential validation fails | Model name not declared, or the provider cannot reach the host | Re-add the model entry, confirm the exact ID, and check outbound HTTPS from the Dify host. |
| Workflow runs but ignores the model | Node still uses the workspace default | Set the model explicitly on the LLM node and re-run the single-node test. |
Limits that change the workflow design
- Plan ceilings beat model windows. A 262,144-token model does not give a Hobby workspace 262K input. Hobby stops at 64K input and 8K output, Starter at 128K and 16K, Builder at 256K and 32K, and Scale at a 512K plan input ceiling with 32K output. Dify will happily build a prompt the plan will reject.
- Context is shared. Retrieved chunks, chat history, tool results and the answer all consume the same window. A RAG workflow with a long history can overflow before the answer starts.
- Concurrency is per account. Hobby allows 4 concurrent requests at 120 RPM, Starter 6 at 240 RPM, Builder 10 at 600 RPM and Scale 16 at 1,200 RPM. Parallel branches and loop iterations multiply the calls one user action makes.
- Daily caps remain on the lower plans. Hobby is limited to 1,000 requests and 2M tokens per day; Starter to 2,000 requests and 5M tokens per day. A workflow that retries internally can exhaust a day of capacity in one batch run.
- One key serves the whole workspace. A runaway app can exhaust the quota for every other app. Use separate keys for development and production, and monitor usage per key.
- Not every OpenAI surface exists. The catalogue covers chat, vision input and embeddings. Image generation, audio transcription, hosted file search and the Assistants product surface are not part of this integration; a Dify tool that expects one of those endpoints needs a different provider.
- Prompt caching is not published. Do not design a Dify workflow around cached input savings until the API documents a cache contract.
What we did not verify
- We did not run Dify end to end on a self-hosted or cloud instance. The settings come from the official Dify provider documentation and the plugin README checked on 20 November 2026; the exact labels and validation behaviour can differ by Dify and plugin version.
- We did not test function calling, vision input, strict structured output or streaming usage accounting through Dify. Each is marked “test first” rather than guaranteed.
- We did not test the non-LLM base URL behaviour for embeddings through this plugin, or the plugin’s separate rerank, speech-to-text and text-to-speech paths with any provider. The plugin README documents the path difference; Plugsky’s embedding endpoint was not exercised through Dify.
- We did not verify Dify Cloud egress to
api.plugsky.comfrom every region, or whether a corporate proxy rewrites the host or strips the Authorization header. - We did not review a SOC 2 report, penetration test or subprocessor list. Request the current report under NDA and confirm the audit period and scope before you rely on it.
Frequently asked questions
Which Dify provider should I use for Plugsky?
Use the OpenAI-API-compatible model provider plugin from the Dify Marketplace. It accepts a custom API base URL, an API key and a model name, which is exactly what a third-party OpenAI-compatible endpoint needs. Do not use the OpenAI provider unless you are actually calling api.openai.com.
What API base URL goes in Dify?
For chat and LLM models, enter https://api.plugsky.com/v1, including /v1 and without a trailing slash. The plugin documents that non-LLM model types such as embeddings and rerank may append /v1 internally, so use https://api.plugsky.com without /v1 for those types. Test the exact combination on your plugin version before loading a knowledge base.
Which Plugsky model ID should I add to Dify?
Start with plugsky-frontier for general reasoning and plugsky-coder for code-heavy workflows. Use the exact ID from GET https://api.plugsky.com/v1/models; display names and OpenAI IDs such as gpt-4o are not served. Add only the models your workflows need, because every model entry shares the workspace key.
Why does Dify report a model or credential error?
The three common causes are an OpenAI key instead of a Plugsky key, a base URL that already ends in /chat/completions, and a model name that is not in the Plugsky catalogue. Re-enter the key, keep the base URL at https://api.plugsky.com/v1 for chat, and copy the model ID from the models endpoint.
Does function calling work in Dify with Plugsky?
Plugsky accepts the OpenAI tools schema, and Dify's agent and tool nodes depend on that path. Reliability varies by model and by workflow length, so enable function calling on the model entry and test one tool call before you build a production agent. Treat vision and strict structured output the same way: test first.
Can Dify use Plugsky embedding models for RAG?
Yes, in principle. plugsky-embed, plugsky-embed-nim and plugsky-embed-multilingual return 2,048-dimension vectors and accept up to 8,192 input tokens. Dify's knowledge base expects a fixed vector dimension, so confirm that 2,048 is accepted and reindex if you change the embedding model. The plugin's non-LLM base URL behaviour is a test-first item.
Next step
Run the smoke test, then add the model to one LLM node. When the node works, move to a tool or knowledge-base workflow and re-check the token budget. The migration checklist at /docs/migrate/openai-api covers the host and parameter changes; the OpenAI-compatible API reference lists what is and is not guaranteed, and /models is the authoritative model list. If you are routing several providers or adding central policy, the AI gateway overview explains that layer.
Put the provider behind one endpoint
Start on the free plan with two keys, then move to a paid plan when concurrency and context ceilings matter.
Start Free → See pricingSources
Every provider claim below was checked on the linked official page on 20 November 2026. Dify and the plugin change frequently; recheck before quoting a field label.
- Dify: Model Providers — provider installation, Add API Key, Add Model, workspace scope. Checked 20 November 2026.
- Dify official plugins: OpenAI-API-compatible README — Type, Model Name, API Key, API Base URL, completion mode, context and token settings, and the non-LLM path note. Checked 20 November 2026.
- Dify: model configuration — custom model and key management. Checked 20 November 2026.
- OpenAI: Chat Completions reference — the wire format both sides implement. Checked 20 November 2026.
Last checked 20 November 2026. Plugsky plan numbers live at /pricing; this page explains the integration and does not replace the plan terms.