- Native AI SDK
- OpenAI SDK
- Anthropic SDK
Prerequisites
A Concentrate AI account with an active API key
sk-cn-v1-.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
| Vercel header | Concentrate replacement |
|---|---|
Authorization: Bearer vck_... | Standard Authorization: Bearer sk-cn-v1-... |
x-api-key (Anthropic surface only) | Standard Authorization: Bearer sk-cn-v1-.... Concentrate’s Messages API also accepts x-api-key for Anthropic-SDK compatibility |
http-referer (app attribution) | Drop. No per-request app attribution; analytics roll up by key/team/org |
x-title (app attribution) | Drop. No per-request app attribution |
Auto-injected o11y headers (VERCEL_DEPLOYMENT_ID, VERCEL_PROJECT_ID via the AI SDK) | Drop. Concentrate records its own per-request telemetry in the dashboard |
Response header mapping
Response header mapping
| Vercel response surface | Concentrate equivalent |
|---|---|
providerMetadata.gateway (routing info, cost, service tier in the response body) | No body field. The resolved provider and cost are recorded per request in the dashboard |
| Request / trace id | X-Request-Id (Concentrate returns its own per-request id, surfaced in dashboard logs) |
| Rate-limit headers | Standard X-RateLimit-* headers. See Errors for 429 semantics |
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
| Vercel option | Concentrate equivalent |
|---|---|
order: [...] (ordered provider fallback) | routing.provider.fallbacks (ordered) |
only: [...] (allowed provider set) | Pin via the model slug (provider/model-id), or constrain with routing.provider.fallbacks |
sort: 'cost' | model: "auto" with routing.model.sort: "cost" |
sort: 'ttft' (time to first token) | model: "auto" with routing.model.sort: "latency" |
sort: 'tps' (throughput) | model: "auto" with routing.model.sort: "performance" |
models: [...] (model-level fallback chain) | routing.model.fallbacks (ordered) |
byok: { provider: [{...}] } (request-scoped BYOK) | Drop. Concentrate owns provider credentials at no per-token BYOK fee |
providerTimeouts: {...} (per-provider failover timeouts) | Automatic failover on any provider error across your fallback chain, plus the 90% per-feature uptime gate |
caching: 'auto' (auto cache breakpoints) | Provider-native prompt caching on Anthropic + AWS Bedrock. Manual cache_control: { type: 'ephemeral' } is honored too |
zeroDataRetention: true | Key-level Zero Data Retention, not a request param |
disallowPromptTraining: true | Covered by ZDR-certified provider routing. Configure at the key level |
serviceTier: 'flex' | 'priority' | No equivalent today. Concentrate routes for uptime and latency automatically |
reasoning: { effort, max_tokens, ... } | Pass reasoning controls in the standard request body. The Responses API normalizes reasoning across providers |
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:
| Author | Provider serving the request | Concentrate slug |
|---|---|---|
Anthropic (claude-haiku-4-5) | Anthropic | anthropic/claude-haiku-4-5 |
| Anthropic (same model, different host) | AWS Bedrock | bedrock/claude-haiku-4-5 |
| Anthropic (same model, different host) | Azure | azure/claude-haiku-4-5 |
Google (gemini-3.5-flash) | Google AI Studio | ai-studio/gemini-3.5-flash |
Meta (llama-3-8b-instruct) | AWS Bedrock | bedrock/llama-3-8b-instruct |
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:
| Vercel AI Gateway | Concentrate AI |
|---|---|
sort: 'cost' | 'ttft' | 'tps' in providerOptions.gateway | model: "auto" with explicit routing.model.sort (cost / latency / performance) |
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.| Vercel AI Gateway surface | Concentrate equivalent |
|---|---|
| Request logs (every routing decision, cost, outcome) | Per-request logs at concentrate.ai |
| Spend monitoring / budgets | Org / team / developer / key spend rollups and per-key spend limits |
App attribution (http-referer / x-title) | No per-request attribution. Roll up by key/team/org |
Routing metadata (providerMetadata.gateway) | Resolved provider recorded per request in the dashboard |
| Observability traces (Vercel Observability → AI) | Per-request logs; previous_response_id on the Responses API links related requests into a stateful tree |
| BYOK ($0 markup) | Not applicable. Concentrate owns provider credentials at no per-token BYOK fee |
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.| Vercel surface | Vercel base URL |
|---|---|
| OpenAI Chat Completions | https://ai-gateway.vercel.sh/v1 |
| OpenAI Responses | https://ai-gateway.vercel.sh/v1 |
| Anthropic Messages | https://ai-gateway.vercel.sh (no /v1) |
Native AI SDK (@ai-sdk/gateway) | resolved automatically from a plain string model id |
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
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.