Setup note · 3 steps
SayGM in Vercel AI SDK
The Vercel AI SDK can override the base URL on any provider. Point the OpenAI and Anthropic providers at SayGM to reach GPT, Claude and open-weight models with one key.
§ 01
Steps
Step 1: Install @ai-sdk/openai for GPT and open models, and @ai-sdk/anthropic for Claude.
Step 2: Create each provider with baseURL set to https://api.saygm.com/v1 and apiKey set to your SayGM key.
Step 3: Call generateText or streamText. Use saygm.chat() so OpenAI-format calls go to Chat Completions, which open models serve.
import { createAnthropic } from "@ai-sdk/anthropic";import { createOpenAI } from "@ai-sdk/openai";import { streamText } from "ai"; const apiKey = process.env.SAYGM_API_KEY;const saygm = createOpenAI({ baseURL: "https://api.saygm.com/v1", apiKey });const claude = createAnthropic({ baseURL: "https://api.saygm.com/v1", apiKey }); const result = streamText({ model: saygm.chat("deepseek-v4.1-flash"), prompt: "Summarise this changelog in three bullets.",}); // For Claude: model: claude("claude-sonnet-5-5")§ 02
Why route Vercel AI SDK through a gateway
- 01
Single key for every provider simplifies secrets management.
- 02
Fusion models combine two to four models and an adjudicator in one call.
- 03
Each response carries its exact charge in the usage block.
§ 03
Models worth trying in Vercel AI SDK
Snapshot SayGM prices per million tokens, input then output.
- Claude Opus 5.5Agentic coding, long multi-step tasks, hard reasoning$3.91 / $19.57
- Claude Sonnet 5.5Daily coding in Claude Code and other coding agents$2.00 / $10.00
- GPT-6.1 SolGeneral assistants and agents at mid-tier cost$1.13 / $5.67
- GPT-6 LunaChat products, summarisation, cheap tool calls$0.06 / $0.28
- Kimi K3Open-weight coding and agent workloads$1.69 / $8.45
- DeepSeek V4.1 FlashBulk generation, cheap open-weight inference$0.04 / $0.17
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 the OpenAI and Anthropic providers at SayGM to reach GPT, Claude and open-weight models with one key.
Which models can I use in Vercel AI SDK through SayGM?
Claude through the Anthropic setup, and GPT and open-weight models through the OpenAI-compatible one, including Claude Opus 5.5, Claude Sonnet 5.5 and GPT-6.1 Sol. SayGM serves Gemini only on generateContent.
Where do I find the SayGM base URL?
The steps above give it for this tool. The SayGM developer docs list the endpoint for each API format: Anthropic Messages, OpenAI Chat Completions and Responses, and Gemini generateContent.