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.
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-...).
Install the Official SDK
Flexlora is 100% wire-compatible with standard AI SDKs. No custom or proprietary libraries are required:
npm install openai
pip install openai
Execute Your First Edge Request
Set baseURL: "https://api.flexlora.com/v1" and pass your flx-... key. Switch languages below to inspect implementation patterns:
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);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.