Developer + API

How do you migrate from OpenAI to Plugsky?

For most stacks migration is one line: change the base URL from api.openai.com/v1 to api.plugsky.com/v1, set your Plugsky key and choose a Plugsky model name. The OpenAI SDKs, prompts, streaming, function calling and JSON mode keep working. Edge runtimes and non-Python stacks follow the same pattern, and a migration checker can generate a snippet for your stack.

Key facts

Core changebase_url to https://plugsky.com/v1
Stacks coveredPython, Node.js, cURL, Go and edge runtimes
Works unchangedSDKs, prompts, streaming, tools, JSON mode and embeddings
Model mappingReplace OpenAI model names with Plugsky model names
RollbackThe same one-line change in reverse
Parallel runningRun both providers behind a feature flag during cutover
Free tierplugsky-micro and plugsky-lite, no card; 14-day full-access trial
Product statusLive

TL;DR

  • Change one constant and keep the rest of your code.
  • Prompts, streaming and function calling run unchanged.
  • Run both providers in parallel during cutover.
  • Map model names deliberately instead of trusting defaults.
  • Rollback is the same one-line change in reverse.

How it works, step by step

  1. Generate a Plugsky API key and store it in an environment variable.
  2. Find every hard-coded OpenAI base URL and model name.
  3. Set base_url to https://plugsky.com/v1 and map your model names.
  4. Run your test suite against Plugsky in a non-production environment.
  5. Verify streaming, tools and JSON mode end to end.
  6. Cut over with a feature flag and keep OpenAI configured as a fallback.
  7. Monitor latency, quality and cost per model after cutover.
1Generate a PlugskyAPI key and storeit in an2Find everyhard-coded OpenAIbase URL and model3Set base_url tohttps://plugsky.com/v1and map your model4Run your test suiteagainst Plugsky ina non-production5Verify streaming,tools and JSON modeend to end.6Cut over with afeature flag andkeep OpenAI

Try it yourself

Open the OpenAI migration checker →

The one-line migration

For most stacks the entire migration is changing one constant: the base URL moves from api.openai.com/v1 to api.plugsky.com/v1. Your existing SDK, prompts and code run against Plugsky with the same request body, response shape, streaming format and function-calling surface.

The only other change is the model name, and that is a mapping exercise rather than a rewrite. Start with a model such as plugsky-pro for production chat, then tune per workload.

The same endpoint exposes 30+ models, so model mapping is the only real decision.

Per-language and runtime notes

In Python, pass the Plugsky key and base URL to the OpenAI client constructor. In Node.js, the same applies to the OpenAI library and to the Vercel AI SDK when you set the base URL on the provider. With cURL, point the request at the Plugsky endpoint and send the same JSON body.

Go clients built on the popular OpenAI library accept a custom base URL in their config. Edge runtimes such as Cloudflare Workers and Vercel Edge simply fetch the Plugsky endpoint directly. None of these require changes to prompts or response handling.

Pre-migration checklist

Generate a key, identify every hard-coded base URL and model name, and keep the key in an environment variable rather than in code. Run your test suite against Plugsky in staging, then verify function calling, JSON mode and streaming specifically, because those are the paths most likely to surprise.

Cut over with a feature flag so rollback stays one line, and keep the incumbent provider configured for the endpoints Plugsky does not cover yet. Run both providers for one to two weeks if your traffic permits, and compare quality and latency before removing the old path. The compatibility reference lists exactly what is covered.

Honest comparison

StepOpenAI todayPlugskyEffort
AuthenticationOpenAI keyPlugsky key in an environment variableMinutes
Base URLapi.openai.com/v1api.plugsky.com/v1One line
Model namesgpt seriesplugsky seriesMapping table
StreamingSSESame SSE formatNone
Tools and JSON modeSupportedSame shapeNone
RollbackNot applicableRevert the base URLOne line

Frequently asked questions

Do I need to rewrite my prompts?

No. Plugsky honours the same prompt format as OpenAI, so your prompts run unchanged.

Will my function-calling code work?

Yes. The tools array and tool call response shape are identical to OpenAI.

Can I run both providers in parallel?

Yes. Use a feature flag or environment variable to switch, and most teams run both for one to two weeks during cutover.

What about streaming?

Streaming works the same way: set stream to true and you receive the same SSE event format.

Which languages are covered?

Python, Node.js, cURL and Go are documented directly, and edge runtimes work because they simply call the HTTP endpoint.

How do I roll back?

Revert the base URL and model names. The code stays OpenAI-compatible in both directions.

Is there a tool to generate the snippet?

Yes. The OpenAI migration checker produces a ready-to-run snippet for your stack.

Cite this page

Plugsky (2026). “Migrate from OpenAI to Plugsky”. Plugsky. Available at: https://plugsky.com/articles/migrate-from-openai (last updated 2026-09-25).