Dify with an OpenAI-compatible API: model provider setup

Add UplinkSwitch to Dify through the OpenAI-API-compatible provider: the base URL, model name and key fields, a key check, and a second model on one key.

Checked 2026-11-22

·All guides·Models

Dify reaches UplinkSwitch through its OpenAI-API-compatible model provider: add a model there with API Base URL https://api.uplinkswitch.com/v1, your sk-uplink-live-… key, and the exact catalog id (for example gpt-6.1-sol) as the Model Name. The provider's form was read from Dify's official plugin source and docs on 2026-11-22; no part of this guide was run against a Dify install, so treat the field labels as current for that day.

What goes in each field

Install the provider from Integrations → Model Provider, choose Add Model on its card, and fill the form in this order:

Field in DifyValue
Model typeLLM
Model NameA catalog id, typed exactly: gpt-6.1-sol
API KeyYour UplinkSwitch key
API Base URLhttps://api.uplinkswitch.com/v1
Completion modeChat
API TypeChat Completions API (the default)
Model context sizeThe id's context_window from the catalog as a whole number; gpt-6.1-sol lists 1.1M
Upper bound for max tokensThe id's max_output_tokens or lower; gpt-6.1-sol lists 128K

The base URL is the gateway, the Model Name is the model. They are separate fields, and a path such as /chat/completions pasted after /v1 is the usual reason a save fails. The key lives in Dify's credential store for that model; it never belongs in a prompt or a workflow variable.

Two selects default to the cautious setting. Function Call Type starts at Not Support and Vision Support at Not Support, so an agent app will not send tools until you change the first one to Tool Call. Change it only for a model you have tried with tools; a chat that answers plain text proves the connection, not every Dify feature built on top of it.

Check the key outside Dify first

bash
curl -s https://api.uplinkswitch.com/v1/models \
  -H "Authorization: Bearer $UPLINKSWITCH_API_KEY" | head -c 400

A JSON list means the key is live and shows which ids it may call. A 401 here is a key problem, and nothing in Dify will fix it.

Add a second model on the same key

Each Dify model entry is one catalog id, so switching models means adding another entry, not another account:

Model NameAvailability on 2026-11-23Price per 1M (in / out)
gpt-6.1-solok$0.582 / $2.91
claude-sonnet-5-5ok$1.164 / $2.91

Both entries use the same base URL and key. Pick between them per app or per LLM node; the balance and the usage log are shared. For raw request examples see the SDK guide, and for a workflow tool with a similar credential screen see n8n.

Questions and answers

API Base URL is https://api.uplinkswitch.com/v1 and stops at /v1. Model Name is one id from the model catalog, such as gpt-6.1-sol, with no provider prefix in front of it.

Call GET /v1/models with the key as a Bearer token, as in the curl above. If that returns a list, the key works and the Dify form is the next place to look: most often the base URL, a mistyped Model Name, or Completion mode left on Completion.

Yes. Add another model entry with a different catalog id and the same key. Nothing changes on the UplinkSwitch side, and each request is billed at the rate of the id that served it.
Join on Telegram
Help