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.

Langflow is a visual framework for building agent and RAG workflows. Langflow includes a CometAPI component that calls CometAPI language models through OpenAI-compatible endpoints.

Prerequisites

Configure the integration

1

Add the CometAPI component

In the Langflow canvas, open the component menu. Search for CometAPI, then add the CometAPI text generation component to your flow.
2

Enter your CometAPI API key

Select the CometAPI component. In the component inspection panel, enter your CometAPI API key in the API key field.
3

Choose a model ID

Set the model ID to a value from the CometAPI Models page. If the component can fetch models after you enter the API key, select the model ID from the model menu.
4

Connect chat input and output

For a minimal test flow, add Chat Input and Chat Output components. Connect Chat Input to the CometAPI component input, then connect the CometAPI output to Chat Output.
5

Test in Playground

Open Playground and send a short message. A successful chat response confirms that Langflow is calling CometAPI.

Use CometAPI inside larger flows

Change the CometAPI component output type to Language Model when another Langflow component needs an LLM input. This is useful for Agent, Prompt Template, and Smart Transform flows. For direct chat, keep the default model response output and connect it to a Chat Output component.

Troubleshooting

Update Langflow to a version that includes the CometAPI bundle. If your deployment hides some components, check the bundle settings or search under language model components.
Confirm that the CometAPI API key is valid and that the account has access to the selected model. You can also enter the model ID manually.
Check that the model ID matches CometAPI exactly and that the flow input is connected to the CometAPI component input.