plaingateway
Integrations

Vercel AI SDK

Configure the Vercel AI SDK to call plaingateway.

Install ai and @ai-sdk/openai-compatible, export PLAINGATEWAY_API_KEY, then:

typescript
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";

const plaingateway = createOpenAICompatible({
  name: "plaingateway",
  apiKey: process.env.PLAINGATEWAY_API_KEY,
  baseURL: "https://api.plaingateway.com/api/v1",
});
const { text } = await generateText({
  model: plaingateway("openai/gpt-5.6-luna"),
  prompt: "Say hello in five words.",
});
console.log(text);