Docs v1.0
Documentation
Getting Started
5 Minutes

5-Minute Quickstart Guide

Get up and running with Flexlora in under 5 minutes. Swap your base URL in the official OpenAI or Anthropic SDK to route traffic through our edge proxy.

1

Generate your Flexlora API Key

Sign in to your Flexlora developer console and open the API Keys manager. Click "Create New Key", set your optional daily/monthly spend limits, and copy your plaintext key (formatted as flx-live-...).

2

Install the Official SDK

Flexlora is 100% wire-compatible with standard AI SDKs. No custom or proprietary libraries are required:

Node.js / Bun / pnpm
npm install openai
Python (pip / poetry)
pip install openai
3

Execute Your First Edge Request

Set baseURL: "https://api.flexlora.com/v1" and pass your flx-... key. Switch languages below to inspect implementation patterns:

typescript
import OpenAI from "openai";

// Initialize OpenAI client pointing to Flexlora Edge Gateway
const client = new OpenAI({
  apiKey: process.env.FLEXLORA_API_KEY, // flx-... key from your console
  baseURL: "https://api.flexlora.com/v1",
});

async function main() {
  const stream = await client.chat.completions.create({
    model: "flexlora:fast",
    messages: [
      { role: "system", content: "You are an expert TypeScript architect." },
      { role: "user", content: "Write a type-safe bounded memory cache." }
    ],
    stream: true,
  });

  for await (const chunk of stream) {
    process.stdout.write(chunk.choices[0]?.delta?.content || "");
  }
}

main().catch(console.error);
4

Inspect Real-Time Logs & FIFO Ledger

Open the Request Logs tab in your dashboard. You will see your completion with recorded latency, prompt & completion token counts, and the micro-deduction from your soonest-expiring credit batch.

Ready for In-Depth Integration?

Dive into our full HTTP specification covering streaming SSE, Anthropic messages, model catalog aliases, and error recovery policies.