razorBridge AI Gateway
Use razorBridge with LangChain
Connect LangChain to razorBridge AI Gateway with a custom base URL. Follow the setup, send a Chat Completions request and check usage.
Get an API keyCreate an account, add prepaid credit, then create your key.
Send your first request
Store your key in RAZORBRIDGE_KEY on your server. These examples send a short, billable request. Keep credentials out of browser code and source control.
Set use_responses_api=False. Start with a plain text message; tool calling and structured output depend on the selected model.
Base URL
https://razorbridge.eu/api/v1/compute/gate
Python
# python -m pip install langchain-openai
import os
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="razorbridge-eu/deepseek-v4-flash-0731",
base_url="https://razorbridge.eu/api/v1/compute/gate",
api_key=os.environ["RAZORBRIDGE_KEY"],
use_responses_api=False,
max_tokens=128,
max_retries=0,
)
print(llm.invoke("Hello!").content)
Scroll horizontally to see the full example.
Check the result
A successful response contains choices and usage. For 401, check the key. For an unavailable model or policy refusal, check the current model list and key permissions. For insufficient credit, add credit before retrying. Disable automatic retries while diagnosing errors.
Connect your stack
Before you start
Does every model stay in the EU?
No. Check the residency label on the selected model. Models without the EU-only label may be processed outside the EU.
How do I make my first request?
Create an account, add prepaid credit and create an API key. Set the base URL, choose a currently listed model and send a Chat Completions request.
Does EU-only mean zero data retention?
No. Processing location and retention are separate questions. Review the DPA, sub-processors and retention terms for your intended use.