- Native AI SDK
- OpenAI SDK
- Anthropic SDK
Prerequisites
A Concentrate AI account with an active API key
sk-cn-v1-.An existing Vercel AI Gateway integration
@ai-sdk/gateway), the OpenAI SDK (Chat Completions or Responses), the Anthropic SDK, fetch, requests, or another HTTP client.Quick Start for Claude Code users
If you use Claude Code, you can install a skill that walks through this migration interactively. It searches your project for AI Gateway usage, collapses the per-surface base URLs (including the Anthropic-base-URL trap), strips Vercel-specific headers, decomposesproviderOptions.gateway, maps model slugs, and generates a verification script. Drop the skill into your ~/.claude/skills/ directory:
/migrate-vercel. Claude will load the skill and run the steps.
ANTHROPIC_BASE_URL=https://ai-gateway.vercel.sh), point it at Concentrate instead. See the Claude Code integration guide.Step 1: Update Your Environment Variables
Replace your AI Gateway key (and any BYOK provider keys) with a single Concentrate key:Step 2: Update Your Client
The two big changes are collapsing the base URL ontohttps://api.concentrate.ai/v1 and dropping Vercel-specific headers and providerOptions.gateway fields. If you used the native @ai-sdk/gateway provider, swap to @ai-sdk/openai pointed at Concentrate. Concentrate does not ship a dedicated SDK because the OpenAI-compatible shape covers every endpoint.
Step 3: Remove Vercel-Specific Headers
None of AI Gateway’s custom headers carry over to Concentrate, so they should come out. They’re dead weight in your client config and mislead future readers. Expand the tables below for the full mapping if any of these are in your code.Request header mapping
Request header mapping
Response header mapping
Response header mapping
Step 4: Decompose Your providerOptions.gateway
AI Gateway layers routing, fallback, caching, and compliance controls onto the standard request body under providerOptions.gateway (and a few top-level fields). A naïve “just change the base URL” migration silently drops these. Concentrate has no providerOptions.gateway primitive. Each behavior is either on by default or expressed as a body param on the request. Expand the table below for the full mapping.
`providerOptions.gateway` key mapping
`providerOptions.gateway` key mapping
Step 5: Update Model Identifiers
Concentrate accepts model strings in two forms:- Bare slug, e.g.
gpt-5.5,claude-haiku-4-5,auto. Routing picks a provider. provider/model-id, e.g.bedrock/claude-haiku-4-5,openai/gpt-5.5. Pins the request to a specific provider.
provider/model form (e.g. anthropic/claude-opus-4.7, openai/gpt-5.5, xai/grok-4.3), so most strings carry over directly once you reconcile version suffixes against GET /v1/models.
One thing to know about the slashed form: the prefix is the provider that serves the request, not the model’s author. For most popular names the two are the same string (openai, anthropic, mistral, cohere). They diverge whenever a model is hosted by something other than its author:
provider/ prefix when you specifically want to pin to one host (for ZDR compliance, contractual reasons, or latency in a specific region).
The only universally required slug change is auto-routing:
provider/model-id pairs, call GET /v1/models or browse the Model Fortress.
Step 6: Reconnect Observability
Concentrate’s dashboard covers the major surfaces you used in the AI Gateway dashboard.Exporting your AI Gateway history
Vercel’s dashboards do not import into Concentrate, and the reverse is also true. Historical request logs stay where they were created. If your migration is driven by compliance or audit requirements, export your history from the Vercel dashboard before deprovisioning.Step 7 (Optional): Adopt the Responses API
If you used Vercel’s OpenAI Responses surface (or the native AI SDK), Concentrate’s native Responses API is the direct successor: it supports streaming, tool calling, structured output, multi-modal input, and web search through a single normalized shape across every provider, andprevious_response_id links related requests into a server-managed conversation tree.
Why migrate to Concentrate
How it works
How it works
https://api.concentrate.ai/v1.Team-scale spend management
Team-scale spend management
http-referer / x-title attribution to maintain.Feature-aware resiliency
Feature-aware resiliency
routing.model.fallbacks, routing.provider.fallbacks), Concentrate’s routing layer ships:- Uptime gate. Providers whose per-feature success rate drops below 90% are skipped.
- Feature degradation. If no provider supports the full requested feature set (e.g.
json_schema), the request is downgraded tojson_objector text instead of failing. - Cache-affinity routing. When multiple providers can serve a request, the one where your actor already has cached tokens is preferred.
providerOptions.gateway block to author per request.Strategy-driven auto routing
Strategy-driven auto routing
model: "auto" accepts an explicit optimization target via routing.model.sort: cost, latency, or performance (default). See Auto Routing. This maps cleanly onto Vercel’s sort metrics (cost / ttft / tps).Native Responses and Messages APIs
Native Responses and Messages APIs
…/v1 base, with no per-surface base-URL difference.Managed provider credentials by default
Managed provider credentials by default
byok config per request.Troubleshooting
Model not found
Model not found
gpt-5.5, claude-haiku-4-5) and provider/model-id slugs both work. If you’re using a provider/ prefix and getting a miss, double-check the prefix is a provider (e.g. bedrock, azure, ai-studio) and not just the author (e.g. meta, google), and reconcile the version suffix against GET /v1/models.Invalid API key error
Invalid API key error
sk-cn-v1-. If you are still sending a Vercel vck_... key (or a VERCEL_OIDC_TOKEN) as the Authorization bearer, you will see a 401. Verify the value in your dashboard and confirm there are no extra spaces or quotes.Requests succeed but nothing shows up in the Concentrate dashboard
Requests succeed but nothing shows up in the Concentrate dashboard
https://api.concentrate.ai/v1, not ai-gateway.vercel.sh. If the SDK is still pointed at Vercel it is logging against your AI Gateway dashboard, not Concentrate.My Anthropic requests 404 after migrating
My Anthropic requests 404 after migrating
https://ai-gateway.vercel.sh with no /v1; Concentrate uses https://api.concentrate.ai/v1 for every surface. If you copied the Vercel Anthropic base URL verbatim, you dropped the /v1 segment. Set the base URL to https://api.concentrate.ai/v1.My provider routing stopped applying
My provider routing stopped applying
providerOptions.gateway (order, only, sort, models, providerTimeouts) has no effect on Concentrate. Express fallbacks via routing.model.fallbacks / routing.provider.fallbacks body params, or use model: "auto" with a routing strategy.Cache hit rate dropped after migrating
Cache hit rate dropped after migrating
caching: 'auto' auto-breakpoints become provider-native caching. Caches are seeded per API key by default; pass prompt_cache_key in the request body if you want to set the seed explicitly.Connection errors
Connection errors
https://api.concentrate.ai/v1 (no per-surface variant like the /v1-less Anthropic base). Test the connection manually:Next Steps
API Reference
Available Models
Auto Routing
Get Support
Feedback
If you hit anything that didn’t translate cleanly (especially aroundproviderOptions.gateway, BYOK, service tiers, app attribution, or the Anthropic base-URL difference), email support@concentrate.ai. The capability gaps called out above are tracked, and migration friction reports directly shape what we ship next.