Docs v1.0
Documentation
Ecosystem Integrations
SDKs & Agent Tooling

Developer Integrations & Tooling

Connect Flexlora to your coding assistants (Cursor, Claude Code, OpenCode), MCP clients, and standard OpenAI / Anthropic SDKs.

Zero SDK Lock-In

Use standard openai, @anthropic-ai/sdk, or LangChain without proprietary SDK wrappers.

Streaming SSE Ready

Full server-sent events (SSE) support for token-by-token streaming in modern frontends and terminal agents.

Tool & Function Calling

Structured JSON outputs and multi-step agentic tool calling handled seamlessly at the edge.

Coding agents

Coding agents

Claude Code CLI

Compatible: set base URL

Autonomous terminal coding assistant using standard Anthropic-compatible routing.

~/.zshrc or ~/.bashrc
1Install CLI

Install globally via npm: npm install -g @anthropic-ai/claude-code.

2Set Environment Variables

Set ANTHROPIC_BASE_URL to Flexlora base URL and export your key prefix.

3Run Claude in Terminal

Run `claude` in your repository. Requests route directly to Flexlora.

Shell Environment (~/.zshrc or ~/.bashrc)bash
export ANTHROPIC_BASE_URL="https://api.flexlora.com/v1"
export ANTHROPIC_API_KEY="flx-live-your-api-key..."

# Run Claude Code CLI
claude

OpenCode / Cline / Continue

Compatible: set base URL

Autonomous coding agent for terminal and IDEs with OpenAI-compatible backend.

~/.config/opencode/opencode.json
1Open Settings

Navigate to OpenCode settings or ~/.config/opencode/opencode.json.

2Add Flexlora Provider

Configure openai-compatible provider block with Flexlora baseURL.

3Select Model

Set default model to flexlora:fast or flexlora:smart.

opencode.jsonjson
{
  "models": {
    "provider": "openai-compatible",
    "baseURL": "https://api.flexlora.com/v1",
    "apiKey": "flx-live-your-api-key...",
    "defaultModel": "flexlora:fast"
  }
}

Codex CLI / Terminal

Compatible: set base URL

Terminal AI assistant utilizing standard OpenAI-compatible environment variables.

~/.bashrc or shell profile
1Export Environment Variables

Export OPENAI_BASE_URL pointing to Flexlora with your API key prefix.

2Specify Model

Set OPENAI_MODEL to flexlora:fast or flexlora:smart.

3Run Prompt

Execute queries and edits directly in your command line.

Shell Environmentbash
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)

Compatible: set base URL

Connect models, streaming tools, and gateway capabilities to Claude Desktop or MCP clients.

claude_desktop_config.json
1Open MCP Settings

In Claude Desktop, open Settings > Developer > Edit Config.

2Add Flexlora Server Block

Configure the @flexlora/mcp-server command with base URL and key prefix.

3Restart Client

Restart Claude Desktop to enable Flexlora tools and model routing.

claude_desktop_config.jsonjson
{
  "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

Editors

Cursor

Compatible: set base URL

AI-first code editor with inline completion and Composer routing.

Cursor Settings > Models
1Open Model Settings

In Cursor, press Cmd+, (or Ctrl+,), then navigate to Features > Models.

2Override Base URL

Turn on "OpenAI API Key", expand "Override OpenAI Base URL", and paste Flexlora URL.

3Add Flexlora Models

Under "Model Names", add flexlora:fast and flexlora:smart.

Cursor Configurationtext
Override Base URL: https://api.flexlora.com/v1
API Key: flx-live-your-api-key...
Model Names: flexlora:fast, flexlora:smart

VS Code (Continue Extension)

Compatible: set base URL

Open-source AI code assistant extension inside Visual Studio Code.

~/.continue/config.json
1Open Continue Config

Click gear icon in Continue tab to open ~/.continue/config.json.

2Add Model Entry

Add an OpenAI provider block with Flexlora apiBase and key prefix.

3Start Coding

Use Cmd+L for chat and Cmd+I for inline edits with Flexlora.

~/.continue/config.jsonjson
{
  "models": [
    {
      "title": "Flexlora Fast",
      "provider": "openai",
      "model": "flexlora:fast",
      "apiBase": "https://api.flexlora.com/v1",
      "apiKey": "flx-live-your-api-key..."
    }
  ]
}
SDKs

SDKs

Python (OpenAI SDK)

Compatible: set base URL

Official OpenAI Python library compatible with base_url override.

Application code / .env
1Install OpenAI Library

Run `pip install openai` in your Python environment.

2Initialize Client

Pass base_url pointing to Flexlora with your API key.

3Create Completion

Call chat.completions.create with flexlora:fast or flexlora:smart.

client.pypython
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)

Compatible: set base URL

Vercel AI SDK and standard OpenAI npm library integration.

Application code / .env.local
1Install Dependency

Install openai via `npm install openai`.

2Instantiate OpenAI Client

Provide baseURL and your Flexlora key prefix.

3Stream Responses

Stream chat completion tokens in real time.

client.tstypescript
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)

Compatible: set base URL

Raw HTTP requests and universal compatibility for Go, PHP, Rust, and cURL.

Terminal or HTTP Client
1Target Endpoint

Send POST requests to https://api.flexlora.com/v1/chat/completions.

2Attach Authorization Header

Include Authorization: Bearer <key-prefix>... and Content-Type headers.

3Supply Model & Messages

Specify model flexlora:fast with standard messages array.

request.shbash
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
  }'