Integrations
Vercel AI SDK
Use BlazeInfer as an OpenAI-compatible provider in the Vercel AI SDK.
SupportedTested with: ai 7.0.159, @ai-sdk/openai-compatible 3.0.82 · Last verified: 2026-11-02
The Vercel AI SDK can use BlazeInfer through its OpenAI-compatible provider.
npm install ai @ai-sdk/openai-compatible
export BLAZE_API_KEY="blz_..."import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const blaze = createOpenAICompatible({
name: "blaze",
baseURL: "https://blaze.e2enetworks.net/v1",
apiKey: process.env.BLAZE_API_KEY,
supportsStructuredOutputs: true,
});
const { text } = await generateText({
model: blaze("google/gemma-4-31b-it"),
prompt: "Say hello in one sentence.",
});
console.log(text);supportsStructuredOutputs: true lets structured output (Output.object) send
your JSON schema to BlazeInfer. Without it, the SDK falls back to plain JSON mode.
Save the file as index.mts, or set "type": "module" in package.json,
because the example uses top-level await.