ULK Cloud

Langflow OpenAI Compatible API | Base URL, API Key, and Endpoint

In Langflow 1.13.4, open Settings → Model Providers → OpenAI Compatible, set Base URL to https://api.ulkcloud.com/v1 and API Key to your sk-ulk- key, and save. The models from GET /v1/models then work in the Language Model and Agent components; only native structured output (response_format) is rejected.

To use an OpenAI-compatible API in Langflow, open Settings → Model Providers → OpenAI Compatible, enter the endpoint in Base URL and your key in API Key, and click Save. For ULK Cloud, the Base URL is https://api.ulkcloud.com/v1 and the key starts with sk-ulk-. Langflow then reads the model IDs from GET /v1/models, and you pick them in the Language Model and Agent components like any built-in provider. Plain chat, streaming, and agent tool calls work. The one setting that fails is native structured output, which sends response_format, a parameter ULK Cloud rejects.

We checked everything below on November 30, 2026 against Langflow 1.13.4 (source at commit 2b6faa1, November 27, 2026) and its OpenAI Compatible provider bundle lfx-openai-compatible 0.2.0. We read the source, then sent the requests Langflow builds to the ULK Cloud API, using the same client library Langflow pins (langchain-openai 1.4.1).

Step 1: Add ULK Cloud as the OpenAI Compatible provider

Langflow has a model provider named OpenAI Compatible since version 1.11. It ships no component of its own. Instead it adds one more provider to Langflow's shared model picker, so every component that has a Language Model field can use it. A regular pip install langflow already includes it.

  1. Click your profile icon, choose Settings, then Model Providers.
  2. Select OpenAI Compatible.
  3. Fill in the two fields:
FieldValue for ULK Cloud
Base URLhttps://api.ulkcloud.com/v1
API KeyYour key from the ULK Cloud console (sk-ulk-...)
  1. Click Save. Langflow checks the endpoint by calling GET /models under the Base URL with your key as a bearer token. If the check fails, the form shows Validation Failed with the reason, and the button changes to Retry Save.

The Base URL works with or without /v1 at the end. The provider declares /v1 as a required suffix, so https://api.ulkcloud.com becomes https://api.ulkcloud.com/v1, and a trailing slash is stripped. The API Key field is optional in Langflow because local servers often need none, but ULK Cloud always needs it: GET /v1/models without a key returns 401.

Step 2: Turn on the ULK Cloud models

After the check succeeds, Langflow lists every ID that ULK Cloud's GET /v1/models returns under Language Models and also under Embedding Models. The response is the standard OpenAI list, {"object": "list", "data": [{"id": "glm-5.3", ...}]}, and Langflow reads the id of each entry and sorts them alphabetically.

Langflow turns on the first five IDs in that order by default. ULK Cloud returns six, so the sixth, glm-5.3-uncensored, stays off until you switch it on in the list. The models as of 2026-11-30, in Langflow's order (US dollars per 1 million tokens):

Model IDInput / outputOn by default
deepseek-v4.1-flash$0.07 / $0.22Yes
deepseek-v4.1-flash-abliterated$1.10 / $2.20Yes
glm-5.3$0.40 / $1.30Yes
glm-5.3-abliterated$3.00 / $6.00Yes
glm-5.3-flash$0.12 / $0.20Yes
glm-5.3-uncensored$0.35 / $1.10No

The three uncensored and abliterated models add an instruction to every request, and its tokens are billed as input, so each call costs more than the per-token price alone suggests. If you only want the general models in your pickers, switch the abliterated ones off here. The models page lists context lengths and output limits.

Leave the entries under Embedding Models unused. Langflow cannot tell chat models from embedding models in a /v1/models list, so it offers every ID in both places, but ULK Cloud has no embeddings endpoint. POST /v1/embeddings returns 404 with Unknown request URL: POST /v1/embeddings.

Step 3: Pick a ULK Cloud model in Language Model or Agent

In a flow, open the Language Model field of a Language Model or Agent component, choose OpenAI Compatible, and pick a model ID. The Base URL and key come from the provider settings, so neither component needs its own key.

Both components build LangChain's ChatOpenAI client and send requests to POST /v1/chat/completions. They never use the Responses API, so nothing has to be switched off.

Component fieldWhat Langflow 1.13.4 sendsULK Cloud
Temperature (Language Model, default 0.1)temperatureAccepted (the slider goes from 0 to 1)
Max Tokens (both components)max_completion_tokensAccepted. 0 or empty sends nothing
Stream (Language Model, off by default)streamAccepted
Agent (always streams)stream: true, toolsAccepted

Two notes about these fields:

  • Set Max Tokens on long flows. With no limit, ULK Cloud caps the answer at 32,768 tokens and holds the cost of that maximum from your balance until the request finishes. A smaller Max Tokens keeps the hold small when many flows run at once.
  • The Agent ignores its Stream toggle. Langflow's Agent component always creates the model with streaming on, and the OpenAI Compatible provider sends no stream_options. Both are fine for ULK Cloud.

Agent tool calls with ULK Cloud

The Agent component passes its tools to the model as OpenAI function definitions in tools, and ULK Cloud accepts them. Langflow marks every model discovered through OpenAI Compatible as able to call tools, so all six IDs appear in the Agent's model list. We tested two of them.

On 2026-11-30 we sent the request the Agent builds (streaming on, one function tool) to glm-5.3-flash and deepseek-v4.1-flash. Both returned a tool call with the right arguments, accepted the tool's result in the next request, and finished with a final answer. We did not test the other four models with tools.

The Agent has Current Date and Calculator tools turned on by default, so a new Agent already sends tools on its first request. Each step the agent takes is a separate request, billed for its own input and output tokens, and the limit is 1,000 requests per minute per API key.

Structured output: what works and what is rejected

ULK Cloud rejects response_format, so Langflow features that ask the model for JSON through that parameter fail with 400 Unsupported parameter: 'response_format'. Features that use a tool call for JSON work.

Langflow featureHow it asks for JSONULK Cloud
Structured Output componentA forced tool call (tools and tool_choice)Works. Tested with glm-5.3-flash
Agent's Structured Response output, with toolsInstructions in the system promptWorks
Agent's Structured Response output, no tools at allresponse_format with a JSON schemaRejected
OpenAI component with JSON Mode onresponse_format: {"type": "json_object"}Rejected

The Agent's Structured Response output only takes the response_format route when the Agent has no tools at all, which happens when you turn off both Current Date and Calculator and connect nothing else. Keep one tool on, or connect a Structured Output component to a Language Model instead.

Environment variables and self-hosted Langflow

Instead of the Settings form, the provider can read two environment variables, which is useful in Docker or on a shared server.

export OPENAI_COMPATIBLE_BASE_URL=https://api.ulkcloud.com/v1
export OPENAI_COMPATIBLE_API_KEY=sk-ulk-...
export LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS=api.ulkcloud.com

The third line matters. When the API key comes from the server environment, Langflow 1.13.4 sends it only to the provider's default endpoint or to a host listed in LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS, so an operator's key cannot be sent to an address someone else typed into a flow. OpenAI Compatible has no default endpoint, so without that line the request stops with Refusing to send a server-provisioned API credential to the non-default endpoint 'api.ulkcloud.com'. A key typed into the Settings form is the user's own and does not need the allowlist.

LANGFLOW_SSRF_ALLOWED_HOSTS is not needed for ULK Cloud. Langflow's SSRF protection blocks loopback and private addresses, and allows plain HTTP only for hosts in that list. api.ulkcloud.com is a public HTTPS address, so it passes without an entry.

Errors in Langflow with ULK Cloud

The first three messages come from Langflow's check when you save the provider. The rest are ULK Cloud's own errors, which appear when a flow runs.

MessageCauseFix
Authentication failed for the OpenAI-compatible endpoint. Check OPENAI_COMPATIBLE_API_KEY.ULK Cloud returned 401 to GET /v1/modelsPaste the sk-ulk- key again
The OpenAI-compatible endpoint at ... returned HTTP 404 for ...The Base URL has extra path, such as /chat/completionsUse https://api.ulkcloud.com/v1
Refusing to send a server-provisioned API credential ...The key comes from an environment variableAdd api.ulkcloud.com to LANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS
Unsupported parameter: 'response_format'.JSON Mode, or Structured Response without toolsSee the structured output section
The model '...' does not existThe model ID was typed by hand with a typoPick it from the list
Your balance is too low for this requestThe balance cannot cover the hold for Max TokensAdd credit, or lower Max Tokens
Rate limit reached: 1000 requests per minute per API key.Too many agent steps or flow runs in one minuteWait, or spread runs over two keys

ULK Cloud does not charge for requests it rejects with any of these errors.

FAQ

Can I use the OpenAI component with an OpenAI API Base instead?

Yes. The OpenAI component (from the OpenAI bundle) has an OpenAI API Base field under its advanced settings: set it to https://api.ulkcloud.com/v1, type a ULK Cloud model ID into Model Name, and paste your key into OpenAI API Key instead of the default OPENAI_API_KEY variable. It sends seed and stream_options, which ULK Cloud accepts, but leave JSON Mode off. The OpenAI Compatible provider is simpler, because it fills the model list for you.

Does the OpenAI Compatible provider work in older Langflow versions?

The provider was added in Langflow 1.11, according to the 1.11 release notes. On an older version, update Langflow. We did not test older versions.

Can I connect two OpenAI-compatible endpoints at the same time?

The OpenAI Compatible provider holds one endpoint at a time. Langflow's own README for the bundle suggests the OpenAI provider's Base URL override or the vLLM provider for a second endpoint.

Can I use ULK Cloud for embeddings or a vector store in Langflow?

No. ULK Cloud serves chat models only, and POST /v1/embeddings returns 404. Use a separate embedding provider for the Embedding Model component and vector stores.

Why does my flow stop with "Your request appears to contain a secret"?

ULK Cloud stops requests that contain something that looks like an API key or a private key before they reach the model, and does not charge for them. Remove the value from the prompt or the tool output. The OpenAI Compatible provider has no field for extra headers, so the X-ULK-Allow-Secrets: true header that turns the check off cannot be set from it.