> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Ace Data Cloud in Dify

> Connect a chat model, run your first workflow, and check usage and errors.

Connect an Ace Data Cloud chat model to Dify, then use it in an **LLM** node, Chatflow, or Agent. You need a Dify workspace where you are an owner or administrator, an Ace Data Cloud API key, and access to the selected model.

## Choose the installation path

| Path | Availability | What you configure |
| - | - | - |
| Dify's **OpenAI-API-compatible** provider | Available in the [official Marketplace](https://marketplace.dify.ai/plugin/langgenius/openai_api_compatible) | Base URL, model ID, and API key |
| **Ace Data Cloud** model provider | Submitted for Marketplace review; publication has not been verified | Model ID and API key; the endpoint is fixed |

<Note>
  The Ace Data Cloud provider is [awaiting review](https://github.com/langgenius/dify-plugins/pull/3219). It is not currently confirmed as a searchable, published Marketplace entry or a default-installed provider. Use the official compatibility provider for the available installation path. The retired collection of first-party Dify tool plugins is not required.
</Note>

## Prepare an API key

1. Sign in to the [Ace Data Cloud console](https://platform.acedata.cloud/console/applications). Activate the chat service you want to use and check its current balance and [model pricing](https://platform.acedata.cloud/models).
2. Create a key in **Credentials**. A service key is limited to its service; a global key can be used across services that your account can access. For an initial `gpt-4.1-mini` test, use a key authorized for that chat model.
3. Store the key in Dify's provider credential settings. Keys are shared within the Dify workspace; use a separate development key when testing. Do not put a key in prompts, screenshots, workflow exports, or source control.

Dify's model credits do not pay for requests made with your Ace Data Cloud key. Those requests use your Ace Data Cloud account balance.

## Configure the available compatibility provider

Open **Integrations → Model Provider**. In versions with the older navigation, open **Settings → Model Providers**. Install [OpenAI-API-compatible](https://marketplace.dify.ai/plugin/langgenius/openai_api_compatible), then choose **Add Model**.

| Field | Initial value |
| - | - |
| Model name / ID | `gpt-4.1-mini` |
| Model type | LLM |
| API Base URL / endpoint | `https://api.acedata.cloud/v1` |
| API key | Your Ace Data Cloud key |
| Completion mode | Chat |
| API type, if shown | Chat Completions API |
| Context token limit | `4096` for the initial test |
| Maximum output tokens | `1024` for the initial test |

The Base URL ends in `/v1`. Dify appends `/chat/completions`; do not append it yourself or use `/openai/v1`. The initial token limits are conservative test settings, not claims about the model's maximum capacity.

Leave optional reasoning, web search, structured output, image input, and tool-calling options disabled for the first text test. Save the model. The compatibility provider may send a small model request while validating the credentials, which can consume API usage.

### Use the Ace Data Cloud provider after publication

Once the named provider is available, install **Ace Data Cloud** from the official Marketplace. On its provider card, choose **Add Model**, enter the exact model ID and API key, and set context and output limits within the model's documented limits. You do not enter a Base URL: the plugin uses `https://api.acedata.cloud/v1/chat/completions`.

The submitted provider validates the key and model ID with a read-only `/v1/models` request. Saving it does not generate a paid answer, but also does not prove that your balance, model entitlement, or every optional feature will work. Confirm those with a short real request.

Both paths in this guide use **Chat Completions**. Do not select image-generation, embedding, or Messages-only models, such as `claude-opus-5-5` and `claude-sonnet-5-5`, for this configuration. A model appearing in `/v1/models` does not establish support for this protocol or for every optional feature.

## Run your first workflow

Create a blank **Workflow** and connect these nodes:

```text theme={null}
Start → LLM → Output
```

1. In **Start**, add a required text input named `question`.
2. In **LLM**, select the provider and `gpt-4.1-mini`. Set the user prompt to the **Start → question** variable using the variable picker. Set maximum output tokens to `64` and turn retries off for this first check.
3. In **Output** (called **End** in older versions), add an output named `answer` and select **LLM → text** as its value. A successful workflow without an Output node may return no data to its caller.
4. Run a preview with the question `Reply only DIFY_OK`. Confirm that the LLM node succeeds, the output contains `DIFY_OK`, and the run reports token usage.
5. For a **Chatflow**, use an **Answer** node instead of Output and insert **LLM → text**. Publish only after preview and usage checks succeed.

## Enable tools or images

Enable **Tool calling** only for a model that supports it. Enable **Streaming tool calls** separately when supported. Use the configured model in an **Agent** node and add one appropriate tool. In the run trace, verify the tool name and arguments, the tool result, and the final answer. Tool selection and a successful final response are separate checks.

Enable **Image input** only for a vision-capable model. Add a small image through Dify's supported file input and ask a simple question about it. Treat a successful text request as text validation only; it does not validate images, structured output, or other features.

## Check usage and cost

After the first request, open [Ace Data Cloud usage](https://platform.acedata.cloud/console/usages). Filter by the test key and time window. Match the model, status, and request details to the Dify run, then check the recorded deduction. Save a request or trace ID for support without sharing the API key.

Charges are recorded in **Credits**. Their USD value is `Credits × (package price / package amount)` using your current package. The named provider reports token usage but does not publish a fixed USD estimate; Dify can display zero estimated cost even when the API request is billable. The Ace Data Cloud usage record is authoritative. Retries, loops, and Agent tool turns can each result in additional model requests.

## Troubleshoot

| Symptom | Check |
| - | - |
| Cannot find Ace Data Cloud in the Marketplace | Publication is still pending. Use the available compatibility provider or check the submission status above. |
| Save fails, or HTTP 400/401 | Confirm the exact Base URL, key, key scope, model ID, and Chat Completions mode. |
| HTTP 403 | Check model access, service activation, and content-policy restrictions. |
| HTTP 429 | Reduce concurrent requests and wait before retrying. |
| HTTP 5xx or a timeout | Check [service status](https://status.acedata.cloud), the request trace, and network access from the Dify server to `api.acedata.cloud:443`. Avoid repeated blind retries. |
| Tools do not run | Verify model support, the provider's tool settings, and the Agent node's configured tools. |
| Workflow succeeds but returns no answer | Map **LLM → text** into **Output → answer**, or the Chatflow's **Answer** node. |
| Dify shows zero cost | Check the Ace Data Cloud deduction; Dify's estimate is not the billing ledger. |

## Validation scope and maintenance

The submitted provider passed unit tests, official package and serverless installation checks, and a real packaged-CLI call. `gpt-4.1-mini` was also verified for text, streaming tool calls, and tool-result continuation. This does not certify full Dify Community Edition/Cloud UI installation, Marketplace publication, every model, or every optional feature.

Keep the provider updated through Dify's plugin manager. Recheck model IDs and prices when changing models, and validate a small workflow before applying an update to production. For support, use [the provider repository](https://github.com/AceDataCloud/dify-model-provider/issues) or `dev@acedata.cloud`.

For protocol details, see [Chat Completions](/en/guides/openai/openai_chat_completions) and Dify's [model provider documentation](https://docs.dify.ai/en/use-dify/workspace/model-providers).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.