Langflow (gateway)

Route Langflow’s 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 packages

$pip install langflow langchain langchain-openai python-dotenv
2

Set environment variables

Set the OpenAI environment variables to point at the Respan gateway. Langflow components built on langchain-openai will pick these up automatically.

$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.

3

Run your flow

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

Switch models

Change the model in your flow’s OpenAI component to another OpenAI model through the same gateway-backed endpoint, for example gpt-5.5 or gpt-5-mini. Use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.

See the full model list.