Plurence is currently in Public Beta. Features and pricing may change. Not recommended for production workloads. Beta Terms

Integration Guides

LangChain / LlamaIndex

Any framework that accepts an OpenAI-compatible endpoint works with Plurence. Change the base URL and API key — the rest is unchanged.

LangChain (Python)

python
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="gpt-4o-mini",
    openai_api_key="plr_live_...",
    openai_api_base="https://gateway.plurence.com/v1",
)

response = llm.invoke("What is the capital of France?")
print(response.content)

You can swap the model to any Plurence-supported model including Claude and Gemini.

LangChain (JS/TS)

typescript
import { ChatOpenAI } from "@langchain/openai";

const llm = new ChatOpenAI({
  model: "gpt-4o-mini",
  openAIApiKey: "plr_live_...",
  configuration: {
    baseURL: "https://gateway.plurence.com/v1",
  },
});

const response = await llm.invoke("What is the capital of France?");
console.log(response.content);

LlamaIndex

python
from llama_index.llms.openai import OpenAI

llm = OpenAI(
    model="gpt-4o-mini",
    api_key="plr_live_...",
    api_base="https://gateway.plurence.com/v1",
)

response = llm.complete("Explain RAG in one sentence.")
print(response.text)

Vercel AI SDK

typescript
import { createOpenAI } from '@ai-sdk/openai';
import { generateText } from 'ai';

const plurence = createOpenAI({
  apiKey: 'plr_live_...',
  baseURL: 'https://gateway.plurence.com/v1',
});

const { text } = await generateText({
  model: plurence('gpt-4o-mini'),
  prompt: 'Hello!',
});

Related