Langflow (gateway)

Langflow is Python-only. Route its underlying LLM calls through the Respan gateway to use 250+ models from different providers. Only your Respan API key is needed — no separate provider keys required.

Setup

1

Install Langflow

$pip install langflow
2

Point Langflow at the gateway

Set the OpenAI environment variables before starting Langflow. Its OpenAI components (built on langchain-openai) read these automatically, so every OpenAI-component call routes through Respan.

$export OPENAI_API_KEY="YOUR_RESPAN_API_KEY"
$export OPENAI_BASE_URL="https://api.respan.ai/api"

No real OpenAI key needed — the Respan gateway handles provider authentication. Leave the API key field blank on your flow’s OpenAI component so it falls back to these env vars.

3

Start Langflow and build your flow

$langflow run

Open the UI and add an OpenAI component to your flow. It calls the gateway using the env vars above, so every run is routed and logged through Respan.

Run an exported flow programmatically (optional)

run_flow_from_json runs a flow you have already exported from the Langflow UI (Share → Export). Export the flow to a .json file first, then:

1from langflow.load import run_flow_from_json
2
3result = run_flow_from_json(
4 flow="path/to/your/flow.json", # exported from the Langflow UI
5 input_value="What is the meaning of life?",
6)
7print(result)

The flow’s OpenAI components use the same OPENAI_API_KEY / OPENAI_BASE_URL env vars, so calls route through Respan.

Switch models

Change the model in your flow’s OpenAI component to another model available through the gateway, for example gpt-5.5 or gpt-5-mini.

See the full model list.