New API · emploidai Marketplace
emploidai Marketplace
Add-onsAppletsPlugins
Search tools, teams, and capabilitiesPublish
MarketplacePluginsNew API
Plugin
Limited listing

New API

by wanghualoong · v0.1.4

Connect Dify to a self-hosted New API gateway (QuantumNous/new-api), an OpenAI/Claude/Gemini-compatible model relay. Fixes Qwen multimodal input, embedding dimensions and speech-to-text compatibility.

1.4k installsUpdated Jun 11, 2026
Publisher information is incomplete

This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.

Capabilities

Models

Available inside your emploidai workspace after installation.

Data sources

Available inside your emploidai workspace after installation.

Category

model

Version

0.1.4wanghualoong

Requirements

Maximum memory 1MB

Pricing

Not disclosed by publisher

Security & access

Review before installing

CompatibleRequires emploidai 1.0.0+

Permissions

  • Uses model capability
  • Uses tool capability

Dependencies

No additional dependencies

emploidai Marketplace

Discover capabilities. Review access. Install inside your workspace.

DocumentationSecuritySupportPrivacyTerms

New API (model provider)

Connect Dify to a self-hosted New API gateway — an OpenAI/Claude/Gemini-compatible AI model relay and asset-management system. New API normalizes many upstream providers into OpenAI-compatible endpoints, so a single connection exposes chat, embedding, rerank, speech-to-text and text-to-speech models from whichever channels your gateway is configured with.

This plugin is purpose-built for New API and fixes several compatibility gaps that the generic OpenAI-API-compatible provider has with models routed through the gateway — especially Qwen / Dashscope.

Supported model types

TypeEndpoint usedNotes
LLM/v1/chat/completions (or /v1/completions)Covers OpenAI, Claude and Gemini chat models, which New API exposes in OpenAI format. Supports vision, audio, video and document input, tool/function calling, reasoning/thinking mode, structured output and an optional web-search toggle.
Text Embedding/v1/embeddingsConfigurable dimensions and per-request batch size for Dashscope text-embedding-v3/v4 and similar.
Rerank/v1/rerankJina / Cohere / Xinference style.
Speech2Text/v1/audio/transcriptionslanguage and prompt are optional, so gpt-4o-transcribe / qwen-asr work.
TTS/v1/audio/speechConfigurable voices and audio format.

Image, video and music generation are not Dify model-provider types and are out of scope for this plugin.

What this plugin fixes vs the generic OpenAI-API-compatible provider

  • Audio input is sent as the OpenAI/Qwen-Omni input_audio part ({data, format}) instead of being wrapped in image_url.
  • Video input is sent as video_url (Qwen-VL) instead of image_url.
  • Document input has a selectable handling mode: openai_file (OpenAI file_data), qwen_fileid (upload via /v1/files and reference fileid://, for Qwen-Long / Dashscope), or image_fallback (render as an image).
  • Embeddings support the dimensions parameter and small batch caps, with an automatic single-input fallback when a batch is rejected.
  • Speech-to-text no longer force-sends language/prompt.

Configuration

Models are added individually (customizable models), so each entry maps to a real model on your gateway and stays fully editable afterwards.

  1. Install the plugin and open Settings → Model Provider → New API.
  2. Click Add Model, choose the model type, and fill in:
    • New API Base URL — your gateway base URL including /v1, e.g. https://your-newapi-domain/v1 (default http://localhost:3000/v1).
    • API Token — a token created in your New API console.
    • Model Name — exactly as it appears on your gateway. If the name is wrong, validation lists the models the gateway reports.
    • The capability switches for that model type (vision, reasoning, tools, web search, file handling mode, embedding dimensions, etc.).
  3. To change anything later, click Configure on the model — all fields remain editable.

Thinking / reasoning mode

Set Thinking Mode Support to Only Non-Thinking Mode to suppress reasoning. The plugin then sends the common vendor "disable thinking" hints (enable_thinking, thinking: {type: disabled}, chat_template_kwargs) so models that support a toggle (e.g. Qwen3, GLM, Doubao) stop generating reasoning at the source, and it also strips any reasoning that still leaks into the answer (<think>...</think> or a lone </think>). Note: some dedicated reasoning models (e.g. DeepSeek-R1) always reason and cannot be disabled — their reasoning is hidden from the answer but still generated.

Finding available model names

When credential validation fails because a model name is not found, the error message lists the models reported by your gateway's /v1/models endpoint. You can also query it directly:

curl https://your-newapi-domain/v1/models -H "Authorization: Bearer <your-token>"

Note: Dify's plugin framework does not support fetching a remote model list into the configuration form, so models are added individually. To bulk-create entries for every model your gateway serves, read its /api/pricing listing and create the models via the Dify Console API.

Multimodal embeddings

For embedding models with Vision Support enabled (e.g. Qwen3-VL-Embedding), inputs may carry images/video in addition to text. Each input can be a JSON object {"text": "...", "image": "<url|data-uri>"} (or "video"), a bare image/video URL, data: URI, or markdown image ![](url); plain strings are sent as text. When vision is enabled every input is sent to /v1/embeddings as an object (the gateway rejects lists that mix plain strings and objects). Note that Dify's standard knowledge-base RAG only embeds text — image/video embedding applies when a caller supplies such inputs explicitly.

License

This plugin's source is provided under the same license as the Dify plugin ecosystem. "New API" and its logo belong to the New API project (QuantumNous/new-api); they are used here only to identify the gateway this plugin connects to.