The Vercel AI SDK with a custom base URL
Create the provider with createOpenAICompatible and this baseURL, and the AI SDK runs Claude, GPT and Grok models through chat completions on your AIGROW key.
Already have a code? Redeem it on API access, then create a key.
JavaScript or TypeScript, an ES module
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText } from 'ai';
const aigrow = createOpenAICompatible({
name: 'aigrow',
baseURL: 'https://aigrow.gg/v1',
apiKey: 'ag_your_key_here',
includeUsage: true,
});
const { text } = await generateText({
model: aigrow('claude-opus-5.5'),
prompt: 'Reply with the word ready',
});
console.log(text);Swap ag_your_key_here for a key from API access.
Where the setting lives
- Every model, chat completions
npm install ai @ai-sdk/openai-compatible- Claude models, Anthropic protocol
npm install ai @ai-sdk/anthropic
Or keep @ai-sdk/openai and use openai.chat
openai(...) calls the Responses API, which the endpoint does not serve. openai.chat(...) calls chat completions, so create every model with it.
import { createOpenAI } from '@ai-sdk/openai';
const openai = createOpenAI({
baseURL: 'https://aigrow.gg/v1',
apiKey: 'ag_your_key_here',
});
const model = openai.chat('gpt-6-astra');Claude on the Anthropic provider
The Anthropic provider adds only /messages to its baseURL, so here the baseURL ends in /v1. apiKey is sent as x-api-key and authToken as a Bearer header; either works with an AIGROW key.
import { createAnthropic } from '@ai-sdk/anthropic';
import { generateText } from 'ai';
const anthropic = createAnthropic({
baseURL: 'https://aigrow.gg/v1',
apiKey: 'ag_your_key_here',
});
const { text } = await generateText({
model: anthropic('claude-opus-5.5'),
prompt: 'Reply with the word ready',
});Which model to use
Put the id in exactly as it is written here.
- Claude Opus 5.5
claude-opus-5.5 - The default in every block on this page, and the cheapest Claude model here per token sent and received. Context: 1,000,000 tokens.
- Grok 4.7
grok-4.7 - The lowest output price here. Its context is half the size of the Claude models. Context: 500,000 tokens.
- GPT-6 Astra
gpt-6-astra - For a GPT model. It costs as much per token as Fable, more than Opus. Context: 1,050,000 tokens.
- Claude Fable 5.1
claude-fable-5.1 - Costs more per token than Opus. Compare the two on the coding leaderboard before you switch. Context: 1,000,000 tokens.
The price list has every id and its credit rate, Claude API pricing has the list prices, and the coding leaderboard compares the models on coding prompts.
Check that it works
First the key on its own, then Vercel AI SDK with it.
The key
Ask for the model list. It needs a valid key and costs nothing.
curl https://aigrow.gg/v1/models -H "Authorization: Bearer ag_your_key_here"{
"object": "list",
"data": [
{ "id": "claude-opus-5.5", "object": "model", ... },
{ "id": "claude-fable-5.1", "object": "model", ... },
{ "id": "gpt-6-astra", "object": "model", ... },
{ "id": "claude-sonnet-5.5", "object": "model", ... },
{ "id": "gpt-6.1-sol", "object": "model", ... },
{ "id": "grok-4.7", "object": "model", ... },
...
],
"has_more": false
}Vercel AI SDK
Save the block as check.mjs, put your key in and run it with Node.
node check.mjsreadyWhen it fails
The Vercel AI SDK errors first, then the answers the endpoint gives any tool.
- 404 on /v1/responses
- The model came from openai(...) in @ai-sdk/openai, which calls the Responses API. Use createOpenAICompatible as in the block, or openai.chat(...).
- 404 on the Anthropic provider
- The baseURL lost its /v1. The Anthropic provider adds only /messages, so its baseURL is https://aigrow.gg/v1.
- Requests still go to OpenAI
- The ready-made openai import uses OPENAI_BASE_URL, or else api.openai.com. Create your own provider with the baseURL, as in the block.
- My tool says 401 or authentication error
- The key is missing or mistyped. Copy it again from API access on the dashboard, and make sure it is sent as the key, not as a model name. A revoked key fails the same way: create a new one and swap it in.
- I get 402 or a message about credit
- Your balance is empty. Open API access on the dashboard, redeem a code or buy another pack, and the next request goes through. Nothing else needs to change.
- It says 404 or Unknown model
- The model has to be one the endpoint serves, for example claude-opus-5.5. The provider’s own spellings work too (claude-opus-5-5, anthropic/claude-opus-5.5), but a dated id or any model outside the catalogue is rejected before the request is forwarded, and nothing is billed. Request GET /v1/models with your key for the live list, or read the ids on the price list.
- Requests are rejected with 429
- The endpoint’s capacity is shared by every buyer: about 20 requests a minute and 4 at once. Each 429 carries a retry-after header, and the OpenAI and Anthropic SDKs wait that long and retry on their own. In a loop of your own, wait the seconds it names or lower your concurrency.
- The model is unavailable right now
- A 404 that says the model is not available right now means it is briefly down at the upstream provider, not a problem with your key or balance. Retry in a moment or send the request to another model.
- I get a 502 or 503
- A transient upstream or configuration hiccup, not a charge against your balance. Retry the request; if it keeps failing, reach us through the store and we will look into it.
What does not work through AIGROW
openai(...) and openai.responses(...), which call the Responses API. Use createOpenAICompatible or openai.chat(...).
The OpenAI provider tools, such as openai.tools.webSearch and file search, which need the Responses API. Tools you define with tool() run in your own code and work on every model.
Live web search inside the model. A web search tool sent with a request is answered from what the model already knows, with no live results. A tool that fetches pages on your own machine still works.
Any endpoint past these three: /v1/messages, /v1/chat/completions and /v1/models. The Responses API, embeddings and token counting answer 404.
Router fields such as models, route, provider and plugins. They are dropped, so a request always goes to the one model it names.
What a month of Vercel AI SDK costs
Vercel AI SDK is billed per token at the credit rates in the price list. An agent sends the whole conversation again with each step, so a long task costs more than its last message suggests; the activity log on API access shows what each request cost.
Questions about Vercel AI SDK and a custom API
- How do I set a custom base URL in the Vercel AI SDK?
- Create a provider with createOpenAICompatible from @ai-sdk/openai-compatible, with baseURL set to https://aigrow.gg/v1 and apiKey set to your key, then pass it a model id such as claude-opus-5.5.
- Why does @ai-sdk/openai give a 404 with a custom base URL?
- Since AI SDK 5, openai(...) calls the Responses API at /v1/responses. The endpoint serves chat completions only, so create the model with openai.chat(...) or use the OpenAI Compatible provider.
- Does the Anthropic provider take a custom baseURL?
- Yes. createAnthropic accepts baseURL, and its default is https://api.anthropic.com/v1, so for AIGROW it is https://aigrow.gg/v1. Set apiKey or authToken to your key.
- Do streamText and tool calls work?
- Yes. streamText streams on both providers, and the tools you define with tool() are sent as function calls that your code runs. includeUsage: true adds token counts to a streamed result.
Sources: Vercel AI SDK OpenAI Compatible provider · Vercel AI SDK OpenAI provider · Vercel AI SDK Anthropic provider. Read 21 October 2026.
Set up another tool
- Claude CodeAnthropic protocol
Four environment variables, in the shell or in settings.json.
- ClineOpenAI protocol
The OpenAI Compatible provider, four fields in the settings screen.
- Roo CodeOpenAI protocol
The OpenAI Compatible provider, the same fields as Cline.
- Kilo CodeOpenAI protocol
A custom provider in the Providers tab; the model list fills itself.
- ContinueOpenAI protocol
A models entry in config.yaml, with provider openai and an apiBase.
- AiderOpenAI protocol
OPENAI_API_BASE and OPENAI_API_KEY, then openai/ before the model id.
- OpenCodeOpenAI protocol
A provider block in opencode.json and the key through /connect.
- ZedAnthropic and OpenAI protocols
An Anthropic compatible provider for Claude, an OpenAI compatible one for GPT and Grok.
- GooseOpenAI protocol
The OpenAI provider with OPENAI_HOST, or a custom provider file.
- OpenAI Agents SDKOpenAI protocol
Your own AsyncOpenAI client, switched to chat completions, with tracing off.
- LangChainAnthropic and OpenAI protocols
ChatOpenAI with base_url for every model, or ChatAnthropic for Claude.
The API guide has the SDKs, curl, the endpoints and the rate limits.
Paste the block and Vercel AI SDK runs on your credit.
Buy a credit pack, redeem the code from your email on API access, create a key and put it in place of ag_your_key_here.