Skip to main content

Prerequisites

1

A Concentrate AI account with an active API key

Sign up or log in at concentrate.ai and create an API key. Your key should start with sk-cn-v1-.
2

An existing Portkey integration

This guide assumes you are calling Portkey from the OpenAI SDK, the portkey-ai SDK, fetch, requests, or another HTTP client (in BYOK or Config-driven mode).

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 Portkey usage, strips x-portkey-* headers, decomposes Configs, maps model slugs, and generates a verification script. Drop the skill into your ~/.claude/skills/ directory:
Then start a Claude Code session in your project and ask it to “migrate from Portkey to Concentrate” or run /migrate-portkey. Claude will load the skill and run the steps.

Step 1: Update Your Environment Variables

Replace your Portkey key and any upstream provider keys with a single Concentrate key:
You no longer need OPENAI_API_KEY, ANTHROPIC_API_KEY, AWS credentials, Azure deployment IDs, or any other upstream provider key. Concentrate owns those credentials. Comment them out (don’t delete) until you’ve verified the migration end-to-end, then remove them.

Step 2: Update Your Client

The two big changes are the base URL and stripping every x-portkey-* header. If you were using the portkey-ai SDK, swap to the OpenAI SDK pointed at Concentrate. Concentrate does not ship a dedicated SDK because the OpenAI-compatible shape covers every endpoint.

Step 3: Remove x-portkey-* Headers

None of Portkey’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.
If your code uses the portkey-ai SDK, the snake_case (Python) or camelCase (Node) parameters map to the same headers above:
Portkey echoes a handful of headers back on every response. If your code reads or logs them, here’s the mapping:

Step 4: Decompose Your Portkey Config

Portkey’s x-portkey-config bundles caching, fallbacks, load balancing, retries, conditional routing, and timeouts into a single saved or inline object. Concentrate does not have a Config 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.
Concentrate has conditional routing, but it conditions on request capabilities (feature support, ZDR flag, per-feature uptime, cache affinity), not on request attributes (metadata, headers, user cohorts). If your Portkey Config routes on _environment, _user, or custom metadata, the migration path is to issue separate keys per condition and pick the key in application code.

Step 5: Update Model Identifiers

Concentrate accepts model strings in two forms:
  • Bare slug, e.g. gpt-4o, claude-haiku-4-5, auto. Routing picks a provider.
  • provider/model-id, e.g. bedrock/claude-haiku-4-5, openai/gpt-4o. Pins the request to a specific provider.
If you were on Portkey with model strings like gpt-4o or claude-sonnet-4-6 and provider selection via x-portkey-provider or a Virtual Key, drop the header and let the model slug carry provider intent. Most Portkey model strings work as-is once you remove the provider header. One thing to know about the slashed form: the prefix is the provider that serves the request, not the model’s author. Portkey customers steering through x-portkey-provider: bedrock (or a Bedrock Virtual Key) with model: "claude-sonnet-4-6" should switch to model: "bedrock/claude-haiku-4-5" (or whichever slug GET /v1/models returns). For most popular names the two are the same string (openai, anthropic, mistral), but they diverge whenever a model is hosted by something other than its author: Bare slugs work in all of these cases. Use them when you don’t care which provider serves the request. Use the 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: For the authoritative list of supported 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 Portkey.

Exporting your Portkey history

Portkey’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, Portkey exposes Log Exports via their Admin API; pull your history out before deprovisioning your Portkey workspace.

Step 7: Migrate Admin and Governance Surface

Portkey’s Admin API (Workspaces, Virtual Keys, Configs, Prompts, Policies, SCIM mappings) maps roughly to Concentrate’s organization/team/key hierarchy plus dashboard-managed settings rather than a separate API surface.

Step 8 (Optional): Adopt the Responses API

For new code, we recommend the native Responses API. It supports streaming, tool calling, structured output, multi-modal input, and web search through a single normalized shape across every provider, and previous_response_id replaces Portkey’s trace_id-grouped sessions with a server-managed conversation tree.

Why migrate to Concentrate

Portkey offers two integration shapes. The migration path differs for each:
  • BYOK mode. Point the OpenAI SDK at https://api.portkey.ai/v1, set x-portkey-api-key, and pass your own provider key via Authorization (with x-portkey-provider: openai) or a stored Virtual Key (x-portkey-virtual-key, or x-portkey-provider: @provider-slug). Migrating here gets you off provider keys entirely.
  • Config-driven mode. Use x-portkey-config to reference a saved or inline JSON config covering caching, fallbacks, load balancing, retries, and timeouts. Decompose the Config: most settings become Concentrate body params or are handled automatically. See Step 4.
Concentrate organizes billing around an organization → team → developer → key hierarchy. Set budgets at any level and roll spend up into a single dashboard. Per-team budgets and per-developer attribution come from the key itself, so there’s no per-request metadata tagging to maintain.
Beyond ordered model and provider fallbacks (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 to json_object or 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.
All on by default. No Config object to author or version.
model: "auto" accepts an explicit optimization target via routing.model.sort: cost, latency, or performance (default). See Auto Routing.
Alongside OpenAI Chat Completions, Concentrate exposes a first-class Responses API and an Anthropic-compatible Messages API.
Concentrate manages provider credentials by default. There are no Virtual Keys, Provider Integrations, or Model Catalog you must configure — point at a model and Concentrate owns the upstream credentials. If you’d rather keep using your own provider accounts, store those keys once in the dashboard with free BYOK and routing uses them automatically.

Troubleshooting

Bare slugs (gpt-4o, 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). Call GET /v1/models for the authoritative list.
Concentrate keys start with sk-cn-v1-. If you are still sending a Portkey x-portkey-api-key value (or an upstream provider key from BYOK mode) as the Authorization bearer, you will see a 401. Verify the value in your dashboard and confirm there are no extra spaces or quotes.
Confirm the base URL is https://api.concentrate.ai/v1, not api.portkey.ai. If the SDK is still pointed at Portkey it is logging against your Portkey workspace, not Concentrate.
Concentrate does not accept arbitrary per-request metadata. Reserved Portkey keys like _user, _environment, and _organisation map to the key/team/org hierarchy. Issue a separate key per user or environment and analytics roll up automatically. Custom metadata keys have no equivalent today.
x-portkey-config is a no-op on Concentrate. Express fallbacks via routing.model.fallbacks / routing.provider.fallbacks body params, or use model: "auto" with a routing strategy. Conditional routing by metadata has no direct equivalent. Handle in application code.
Concentrate uses provider-native prompt caching, currently supported on Anthropic and AWS Bedrock. There is no semantic cache and no gateway-stored cache, so Portkey’s simple and semantic cache modes do not carry over. Caches are seeded per API key by default; pass prompt_cache_key in the request body if you want to set the seed explicitly (the analog of x-portkey-cache-namespace).
Confirm the base URL is https://api.concentrate.ai/v1 (no /api segment, no per-provider subdomain). Test the connection manually:

Next Steps

API Reference

Explore the full API capabilities

Available Models

Browse all supported models

Auto Routing

Optimize model selection automatically

Get Support

Contact our support team

Feedback

If you hit anything that didn’t translate cleanly (especially around Configs, Prompt templates, conditional routing, custom hosts, or per-request metadata), email support@concentrate.ai. The capability gaps called out above are tracked, and migration friction reports directly shape what we ship next.