---
title: "Langflow OpenAI component with a custom API base | BroadRouter"
description: "Use BroadNet Inference in Langflow with the OpenAI component's OpenAI API Base field and a typed model name, and why the OpenAI Compatible provider won't list it."
url: https://broadrouter.com/guides/langflow-openai-compatible/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Connect Langflow to BroadNet Inference

Updated 2026-11-16

In Langflow, add the OpenAI component from the OpenAI bundle. Type a BroadNet ID such as broadnet/glm-5.3 into Model Name, paste your BroadNet key, and in the advanced settings set OpenAI API Base to https://inference.broadnet.ai/v1. Don't use the OpenAI Compatible model provider. It lists models from /v1/models, and BroadNet's lists only the transcription models.

Langflow is an open-source visual builder for agents and RAG flows. Its **OpenAI** component has an **OpenAI API Base** field that, in the component’s own words, lets you “use other APIs”. BroadNet Inference serves chat completions at `https://inference.broadnet.ai/v1`, so that component works with a typed BroadNet model ID. BroadRouter is BroadNet’s own site; this follows the Langflow 1.13.x docs and the component’s source in v1.13.2.

## Setup

1.  **Add the component.** In a flow, open the components panel and add **OpenAI** from the OpenAI bundle. Langflow 1.13.2 installs this bundle with the main package.
    
2.  **Model Name.** Click the field and type `broadnet/glm-5.3`. It accepts custom values, so you aren’t limited to the OpenAI models in the list.
    
3.  **OpenAI API Key.** Paste your BroadNet key, or pick a global variable that holds it.
    
4.  **Advanced settings.** Open the component’s controls and set:
    
    | Field | Value |
    | --- | --- |
    | OpenAI API Base | `https://inference.broadnet.ai/v1` |
    | Max Tokens | 4000 |
    
5.  **Run it.** Connect a Chat Input and Chat Output, open the Playground and send a message. A reply means the settings are right.
    

## Two Langflow checks that can block BroadNet

Langflow 1.13 has SSRF protection on by default. Two rules matter:

-   **Keys from the server environment.** If the API key comes from the server’s environment (for example a global variable loaded from an environment variable), Langflow refuses to send it to a non-default endpoint unless the host is allowlisted. The operator sets:
    
    ```bash
    export LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS=inference.broadnet.ai
    ```
    
    A key typed into the component isn’t affected.
    
-   **Private addresses.** Loopback and private IPs are blocked unless they are in `LANGFLOW_SSRF_ALLOWED_HOSTS`. BroadNet is a public HTTPS host, so this only matters if you route it through a local proxy.
    

## Why not the OpenAI Compatible provider?

Langflow 1.13 also has an **OpenAI Compatible** model provider under **Settings → Model Providers**. Its docs say it validates the connection against the endpoint’s `/v1/models` route and offers the models it finds. When we checked on 16 November 2026, BroadNet’s `/v1/models` listed only `broadnet/cohere-transcribe-arabic` and `broadnet/cohere-transcribe`, so the chat models can’t be picked there. The OpenAI component’s typed model name avoids that.

## Which model to pick

| Flow | Model |
| --- | --- |
| Agent component with tools | `broadnet/glm-5.3` |
| Flows with images or Arabic text, with tools | `broadnet/qwen3.8-27b` |
| Long-document flows, flat-price plan | `broadnet/deepseek-v4.1-flash` |
| Trying Langflow on the starting credit | `broadnet/gemma-4-26b-a4b` (32,768-token context) |

BroadNet’s docs list tools and structured output for GLM 5.3 and Qwen3.8 27B only. The component’s **JSON Mode** sends `response_format: {"type": "json_object"}`; use it with those two models. [Prices for every model](https://broadrouter.com/pricing/).

## How we tested this

We did not run the Langflow UI. On 2026-11-15 we installed `lfx` 1.13.2 and the `lfx-openai` bundle, whose OpenAI component file matches the v1.13.2 source, and built the component in Python against a local mock server that speaks BroadNet’s chat-completions shape. With a typed key and `LANGFLOW_SSRF_ALLOWED_HOSTS` set for the local mock, the request went to `/v1/chat/completions` with the model ID `broadnet/glm-5.3` unchanged, a Bearer key, `temperature: 0.1` and a `seed`. The Max Tokens value was sent as `max_completion_tokens`; BroadNet’s API reference describes `max_tokens`. A key copied from the server environment was refused until we also set `LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS`. We had no BroadNet key, so we did not test real model output.

## Troubleshooting

-   **“Refusing to send a server-provisioned API credential”.** Add `inference.broadnet.ai` to `LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS`, or type the key into the component.
-   **401.** The key is wrong, expired or out of allowance.
-   **404.** OpenAI API Base must end in `/v1`, and Model Name must match BroadNet’s ID exactly. Paid models need a top-up; the $5 credit covers only `broadnet/gemma-4-26b-a4b` and the two Transcribe models.
-   **Empty replies.** Reasoning counts toward the output limit on DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B. Raise Max Tokens. [Why answers come back empty](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **429.** A pay-as-you-go key allows 30 requests a minute and 4 in flight. See [errors and retries](https://broadrouter.com/guides/errors-and-retries/).

## Terms in this guide

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Chat Completions API](https://broadrouter.com/glossary/chat-completions-api/)

The Chat Completions API is OpenAI's HTTP endpoint, POST /v1/chat/completions, that takes a model name and a list of role-tagged messages and returns the model's next message. Its request and response shape became the common format that OpenAI-compatible providers and SDKs reuse.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[JSON mode](https://broadrouter.com/glossary/json-mode/)

JSON mode is an LLM API setting, response\_format {"type": "json\_object"} in OpenAI-style APIs, that makes the model's reply valid, parseable JSON. Unlike structured outputs with a JSON Schema, it does not guarantee which keys, types or values the object contains.

[Prepaid credit](https://broadrouter.com/glossary/prepaid-credit/)

Prepaid credit is money added to an API account before use. Each request deducts its cost from the balance, and when the balance runs out, metered requests stop until you top up. It caps spend at what you have paid in.

## Questions

### Why doesn't the OpenAI Compatible provider show GLM 5.3 or Qwen?

Langflow's docs say that provider discovers models from the endpoint's /v1/models route. When we checked on 16 November 2026, BroadNet's /v1/models listed only the two transcription models, so its chat models never appear. Use the OpenAI component with a typed model name instead.

### Can I type a model that isn't in the OpenAI component's list?

Yes. Model Name is a combobox, which in Langflow's input definitions means the user can enter a custom value. Type the full BroadNet ID, such as broadnet/glm-5.3.

### Why does Langflow refuse to send my key to BroadNet?

Langflow 1.13 won't send an API key that comes from the server environment to a custom endpoint unless the operator allows the host. Set LANGFLOW\_PROVIDER\_CREDENTIAL\_ALLOWED\_HOSTS=inference.broadnet.ai, or paste the key into the component.

### Does the Langflow OpenAI component use the Responses API?

No. It builds LangChain's ChatOpenAI, which calls chat completions for normal requests. In our test it called /v1/chat/completions.

## Related guides

-   [Connect Flowise to BroadNet Inference (OpenAI Custom Model)](https://broadrouter.com/guides/flowise-openai-compatible/)
-   [Add BroadNet Inference to Dify with the OpenAI-API-compatible plugin](https://broadrouter.com/guides/dify-openai-api-compatible/)
-   [Use LangChain with BroadNet Inference](https://broadrouter.com/guides/langchain-openai-base-url/)
-   [Why a reasoning model returns an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/)
-   [All tools that work with BroadNet Inference](https://broadrouter.com/integrations/): SDKs, coding agents, chat UIs and automation tools, with exact settings for each

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-langflow-openai-compatible&utm_content=page-cta) ·

**Sources**

-   [Langflow docs 1.13.x, OpenAI bundle (checked 2026-11-15)](https://docs.langflow.org/bundles-openai)
-   [Langflow docs 1.13.x, OpenAI Compatible provider (checked 2026-11-15)](https://docs.langflow.org/bundles-openai-compatible)
-   [Langflow source, OpenAI component at v1.13.2 (checked 2026-11-15)](https://github.com/langflow-ai/langflow/blob/v1.13.2/src/bundles/openai/src/lfx_openai/components/openai/openai_chat_model.py)
-   [Langflow docs, SSRF protection (checked 2026-11-16)](https://docs.langflow.org/api-keys-and-authentication#ssrf-protection)
-   [BroadNet Inference API reference (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-langflow-openai-compatible&utm_content=sources)
