Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Dify is an open-source LLM application development platform. By connecting it to CometAPI, you can use current CometAPI model IDs inside Dify’s workflow, chatbot, and agent builders.

Prerequisites

The easiest way to connect. Dify Marketplace provides an official CometAPI plugin that handles the integration automatically.
1

Get your CometAPI API key

Log in to the CometAPI dashboard. Click Add API Key and copy your key.
CometAPI dashboard showing the Add API Key button and key list
CometAPI API key details showing the base URL https://api.cometapi.com
2

Install the CometAPI plugin in Dify

In Dify, go to PluginsInstall PluginMarketplace. Search for cometapi and install it.
Dify plugin marketplace search results showing the CometAPI plugin
CometAPI plugin installation confirmation dialog in Dify
3

Add your API key

Go to SettingsModel ProviderCometAPIOpen Settings. Paste your CometAPI API key and click Save.
4

Add models

Enter a model ID from the CometAPI Models page and click Add.
Dify model provider settings showing the CometAPI configuration form
Dify model list with CometAPI models successfully added
5

Test the connection

Create a chatbot or workflow and select a CometAPI model. Send a test message — a successful response confirms the integration is working.
Dify chat interface showing a successful response from a CometAPI model

Method 2: OpenAI-compatible provider

Use this method to add models not covered by the CometAPI plugin, such as Claude, Grok, or Gemini — or to use custom model names.
1

Open model provider settings

Go to SettingsModel ProviderOpenAI-API-compatibleAdd Model.
2

Configure the model

Fill in the following fields:
FieldValue
Model typeLLM
Model nameModel ID from CometAPI (must match exactly)
API keyYour CometAPI API key
API endpoint URLhttps://api.cometapi.com/v1
Click Save.
Dify OpenAI-compatible provider form with CometAPI values filled in
Dify model list showing a newly saved CometAPI-compatible model entry
For model identifiers, refer to the CometAPI Models page. The model ID in Dify must exactly match the identifier used in CometAPI.

Troubleshooting

If a call fails, check:
  • The API key is correct and has available balance
  • The model ID matches exactly what CometAPI expects
  • The API endpoint URL includes /v1 (required for the OpenAI-compatible method)
For further help, visit the CometAPI support page.