Use case
Migrate OpenAI SDK apps to a multi-model gateway
Many AI products start with a single OpenAI SDK integration. The next problem is model choice: teams want Claude for some tasks, DeepSeek for cost control, Gemini for experiments and Chinese model families for regional use cases. PEKPIK LLM keeps the OpenAI-style client while expanding the model menu.
Why teams search for this
Where PEKPIK fits
Good fit
- OKYou have OpenAI SDK code already in production.
- OKYour team needs more model families but wants to avoid a full abstraction rewrite.
- OKYou want staged rollout, fallback and cost comparison.
Check first
- !Do not migrate all traffic at once; start with staging and representative prompts.
- !Validate tool calls, JSON mode and streaming behavior if your app depends on them.
- !Keep your old provider path available until evaluation passes.
OpenAI-compatible example
base_url swapfrom openai import OpenAI
client = OpenAI(
base_url="https://aiapiv2.pekpik.com/v1",
api_key="sk-...",
)
response = client.chat.completions.create(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Summarize this for a product team."}],
) Suggested rollout
- 01
Extract base URL, API key and model ID into environment configuration.
- 02
Point staging traffic at PEKPIK and keep the same SDK methods.
- 03
Run regression prompts for quality, formatting and latency.
- 04
Roll out by workload segment, then retire provider-specific paths only when stable.
FAQ
What is the smallest migration change?
For standard OpenAI SDK calls, the smallest change is usually the base URL, API key and model ID.
Should I build my own router instead?
Self-hosted routing can work for teams with infrastructure bandwidth. A managed gateway is simpler when procurement, billing and upstream operations are the bottleneck.