Skip to content
TokenGauge
Menu

Setup note · 3 steps

SayGM in Vercel AI SDK

The Vercel AI SDK can override the base URL on any provider. Point it at SayGM to reach Claude, GPT, Gemini and open-weight models with one key.

Updated 9 Oct 2026

§ 01

Steps

  1. Step 1: Install @ai-sdk/openai or @ai-sdk/anthropic.

  2. Step 2: Create the provider with baseURL set to the SayGM endpoint and apiKey set to your SayGM key.

  3. Step 3: Call generateText or streamText with the model ID you want.

TypeScript
import { createOpenAI } from "@ai-sdk/openai";import { streamText } from "ai"; const saygm = createOpenAI({  baseURL: process.env.SAYGM_BASE_URL,  apiKey: process.env.SAYGM_API_KEY,}); const result = streamText({  model: saygm("claude-sonnet-5"),  prompt: "Summarise this changelog in three bullets.",});

§ 02

Why route Vercel AI SDK through a gateway

  • 01

    Single key for every provider simplifies secrets management.

  • 02

    Fusion models combine several models in one call for higher accuracy.

  • 03

    Per-key rate limits can be raised on request.

§ 03

Models worth trying in Vercel AI SDK

Snapshot SayGM prices per million tokens, input then output.

§ 04

Vercel AI SDK questions

Does Vercel AI SDK work with SayGM?

Yes. The Vercel AI SDK can override the base URL on any provider. Point it at SayGM to reach Claude, GPT, Gemini and open-weight models with one key.

Which models can I use in Vercel AI SDK through SayGM?

Any model in the SayGM catalogue, including Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, Claude Opus 5 and confidential open-weight models.

Where do I find the SayGM base URL?

The endpoints for the OpenAI, Anthropic and Gemini compatible APIs are listed in the SayGM developer docs, linked from the SayGM website after sign-up.