Developer Integrations & Tooling
Connect Flexlora to your coding assistants (Cursor, Claude Code, OpenCode), MCP clients, and standard OpenAI / Anthropic SDKs.
Use standard openai, @anthropic-ai/sdk, or LangChain without proprietary SDK wrappers.
Full server-sent events (SSE) support for token-by-token streaming in modern frontends and terminal agents.
Structured JSON outputs and multi-step agentic tool calling handled seamlessly at the edge.
Coding agents
Claude Code CLI
Autonomous terminal coding assistant using standard Anthropic-compatible routing.
Install globally via npm: npm install -g @anthropic-ai/claude-code.
Set ANTHROPIC_BASE_URL to Flexlora base URL and export your key prefix.
Run `claude` in your repository. Requests route directly to Flexlora.
export ANTHROPIC_BASE_URL="https://api.flexlora.com/v1"
export ANTHROPIC_API_KEY="flx-live-your-api-key..."
# Run Claude Code CLI
claudeOpenCode / Cline / Continue
Autonomous coding agent for terminal and IDEs with OpenAI-compatible backend.
Navigate to OpenCode settings or ~/.config/opencode/opencode.json.
Configure openai-compatible provider block with Flexlora baseURL.
Set default model to flexlora:fast or flexlora:smart.
{
"models": {
"provider": "openai-compatible",
"baseURL": "https://api.flexlora.com/v1",
"apiKey": "flx-live-your-api-key...",
"defaultModel": "flexlora:fast"
}
}Codex CLI / Terminal
Terminal AI assistant utilizing standard OpenAI-compatible environment variables.
Export OPENAI_BASE_URL pointing to Flexlora with your API key prefix.
Set OPENAI_MODEL to flexlora:fast or flexlora:smart.
Execute queries and edits directly in your command line.
export OPENAI_BASE_URL="https://api.flexlora.com/v1"
export OPENAI_API_KEY="flx-live-your-api-key..."
export OPENAI_MODEL="flexlora:fast"Model Context Protocol (MCP)
Connect models, streaming tools, and gateway capabilities to Claude Desktop or MCP clients.
In Claude Desktop, open Settings > Developer > Edit Config.
Configure the @flexlora/mcp-server command with base URL and key prefix.
Restart Claude Desktop to enable Flexlora tools and model routing.
{
"mcpServers": {
"flexlora": {
"command": "npx",
"args": ["-y", "@flexlora/mcp-server"],
"env": {
"FLEXLORA_BASE_URL": "https://api.flexlora.com/v1",
"FLEXLORA_API_KEY": "flx-live-your-api-key..."
}
}
}
}Editors
Cursor
AI-first code editor with inline completion and Composer routing.
In Cursor, press Cmd+, (or Ctrl+,), then navigate to Features > Models.
Turn on "OpenAI API Key", expand "Override OpenAI Base URL", and paste Flexlora URL.
Under "Model Names", add flexlora:fast and flexlora:smart.
Override Base URL: https://api.flexlora.com/v1
API Key: flx-live-your-api-key...
Model Names: flexlora:fast, flexlora:smartVS Code (Continue Extension)
Open-source AI code assistant extension inside Visual Studio Code.
Click gear icon in Continue tab to open ~/.continue/config.json.
Add an OpenAI provider block with Flexlora apiBase and key prefix.
Use Cmd+L for chat and Cmd+I for inline edits with Flexlora.
{
"models": [
{
"title": "Flexlora Fast",
"provider": "openai",
"model": "flexlora:fast",
"apiBase": "https://api.flexlora.com/v1",
"apiKey": "flx-live-your-api-key..."
}
]
}SDKs
Python (OpenAI SDK)
Official OpenAI Python library compatible with base_url override.
Run `pip install openai` in your Python environment.
Pass base_url pointing to Flexlora with your API key.
Call chat.completions.create with flexlora:fast or flexlora:smart.
from openai import OpenAI
client = OpenAI(
base_url="https://api.flexlora.com/v1",
api_key="flx-live-your-api-key...",
)
response = client.chat.completions.create(
model="flexlora:fast",
messages=[{"role": "user", "content": "Explain AI routing"}],
stream=True
)
for chunk in response:
print(chunk.choices[0].delta.content or "", end="", flush=True)Node.js / TypeScript (AI SDK & OpenAI)
Vercel AI SDK and standard OpenAI npm library integration.
Install openai via `npm install openai`.
Provide baseURL and your Flexlora key prefix.
Stream chat completion tokens in real time.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.flexlora.com/v1",
apiKey: "flx-live-your-api-key...",
});
const response = await client.chat.completions.create({
model: "flexlora:fast",
messages: [{ role: "user", content: "Hello Flexlora" }],
stream: true,
});
for await (const chunk of response) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}Universal OpenAI API (cURL / HTTP)
Raw HTTP requests and universal compatibility for Go, PHP, Rust, and cURL.
Send POST requests to https://api.flexlora.com/v1/chat/completions.
Include Authorization: Bearer <key-prefix>... and Content-Type headers.
Specify model flexlora:fast with standard messages array.
curl -X POST https://api.flexlora.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer flx-live-your-api-key..." \
-d '{
"model": "flexlora:fast",
"messages": [{"role": "user", "content": "Ping from terminal"}],
"stream": true
}'