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.
§ 01
Steps
Step 1: Install @ai-sdk/openai or @ai-sdk/anthropic.
Step 2: Create the provider with baseURL set to the SayGM endpoint and apiKey set to your SayGM key.
Step 3: Call generateText or streamText with the model ID you want.
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.
- Claude Fable 5.1The hardest reasoning and agent tasks, where cost matters least$8.89 / $44.45
- Claude Opus 5.5Agentic coding, long multi-step tasks, hard reasoning$3.56 / $17.78
- Claude Sonnet 5.5Daily coding in Cursor, Cline and Claude Code$1.78 / $8.89
- Claude Opus 5Agentic coding, long multi-step tasks, hard reasoning$4.45 / $22.23
- Claude Sonnet 5Daily coding in Cursor, Cline and Claude Code$1.78 / $8.89
- Claude Haiku 4.5Classification, extraction, high-volume pipelines$0.89 / $4.45
Other notes: Cursor · Cline · Claude Code · OpenAI SDK · Anthropic SDK
§ 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.