Use MartLLM with Dify

There are two ways to use MartLLM models in Dify, on Dify Cloud or self-hosted:

  • The MartLLM model provider from the Dify Marketplace: one key, a list of models ready to pick.
  • Dify's OpenAI-API-compatible provider: you add each model by hand with the MartLLM address.

Before you start

  • A MartLLM account with credit, and an API key from Dashboard → Keys. Keys start with ull_.
  • In Dify, only the workspace owner and admins can add model providers.

Way 1: the MartLLM model provider

  1. In Dify, open Integrations → Model Provider and go to the Marketplace. The provider is listed as UberLLM, MartLLM's name until November 2026. Install it.
  2. On its card, click Add API Key, paste your ull_... key and save. Dify checks the key by reading your balance, which costs nothing.
  3. Pick a MartLLM model in any LLM node, agent or chat app.

To use a model that is not in the list, click Add Model on the card and enter the exact model id from the catalog, for example qwen/qwen3-coder, with your key and the model's context size.

Source code of the provider: github.com/al-global-tech/dify-plugin-uberllm.

Way 2: the OpenAI-API-compatible provider

Use this if you would rather not install another provider.

  1. In Integrations → Model Provider, install OpenAI-API-compatible if it is not there yet.
  2. Click Add Model on its card and fill in:
    • Model Type: LLM
    • Model Name: a MartLLM model id, for example deepseek/deepseek-v4.1-flash
    • API Key: your ull_... key
    • API Base URL: https://api.martllm.com/v1
    • Completion mode: Chat
    • Model context size: the context length shown on the model's page, for example 1048576 for deepseek/deepseek-v4.1-flash
  3. Save. Dify checks the model with your key before it adds it.
  4. Repeat for each model you want.

Leave API Type on Chat Completions unless you need the Responses API; MartLLM serves both (Responses API).

Costs

Dify does not show MartLLM prices. Every call and its exact cost is under Dashboard → Activity, and current prices are on the model pages.

Self-hosted Dify

Your Dify server must be able to reach https://api.martllm.com over HTTPS (port 443).

Common errors

What you see Cause and fix
The key is not accepted, or 401 The key is missing, mistyped or deleted. Create a new one in Dashboard → Keys and paste it again.
404 with "page not found" (Way 2) API Base URL must be https://api.martllm.com/v1, with /v1 and nothing after it.
404 model_not_found The model id is mistyped. It needs its maker in front, such as deepseek/deepseek-v4.1-flash.
402 insufficient_credits Your balance is empty. Add credit under Dashboard → Credits.
402 key_spend_cap_exceeded The key reached its spend limit. Raise the limit on the key, or use another key.

More codes: Errors.

Support

For account, billing, API or model problems, write to [email protected].