2027 compatibility guide · Evidence checked 20 November 2026

OpenAI-compatible API: what works, what breaks, and how to migrate

Plugsky implements the OpenAI wire format at https://api.plugsky.com/v1, so most integrations need a base URL, a key and a model ID rather than a rewrite. This page is the canonical compatibility reference: the exact base URL, SDK snippets, a feature-by-feature matrix, the failures that catch teams during migration, and the limits that stay in place after cutover.

Short answer. An OpenAI-compatible API accepts OpenAI SDK request shapes, so you can keep the client library and change the base URL, key and model ID. Plugsky supports Chat Completions, streaming, tool calling, JSON mode and embeddings at https://api.plugsky.com/v1. Compatibility is about the protocol, not feature parity: OpenAI-only parameters, stateful Responses features and the Assistants product surface need testing or a different design.

What “OpenAI-compatible” means at Plugsky

Compatibility is a contract about the request and response format. When a client sends POST /v1/chat/completions with a messages array, the server should accept the same roles, return the same choices envelope and report errors in the same general shape. That is what lets the official OpenAI SDK, LangChain, Cline, Continue and similar tools point at a different host without a custom client.

It is not a promise that every OpenAI feature exists behind the endpoint. A provider can implement Chat Completions faithfully and still have no Assistants API, no vector store, no hosted browsing tool and no image-generation model. The matrix below separates the surfaces Plugsky documents from the surfaces it does not, because the difference is where migrations fail.

Base URL and a first request

The approved base URL is https://api.plugsky.com/v1. Include /v1, do not add a trailing slash, and do not append /chat/completions when a field is labelled “base URL” — the SDK adds the path. Keys are sent as a bearer token, exactly as with OpenAI.

Python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_PLUGSKY_API_KEY",
    base_url="https://api.plugsky.com/v1",
)

response = client.chat.completions.create(
    model="plugsky-coder",
    messages=[
        {"role": "system", "content": "You are a precise code reviewer."},
        {"role": "user", "content": "Review this function for race conditions."},
    ],
    temperature=0.2,
)
print(response.choices[0].message.content)

The same three values work in the JavaScript SDK. The property is baseURL in camel case, and the key is read from the environment so it does not end up in source control.

JavaScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.PLUGSKY_API_KEY,
  baseURL: "https://api.plugsky.com/v1",
});

const response = await client.chat.completions.create({
  model: "plugsky-coder",
  messages: [{ role: "user", content: "Write a SQL migration for a nullable column." }],
});

console.log(response.choices[0].message.content);

For a shell smoke test, call the endpoint directly. A 200 with a choices array proves the host, key and model ID before you involve an editor extension or an orchestration framework.

cURL
curl https://api.plugsky.com/v1/chat/completions \
  -H "Authorization: Bearer $PLUGSKY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "plugsky-micro",
    "messages": [{"role": "user", "content": "Reply with the word pong."}]
  }'

Host note. This page uses https://api.plugsky.com/v1, the approved API host. Plugsky’s public documentation also shows https://plugsky.com/v1 in examples. Both hosts answered GET /v1/models on 20 November 2026, but they are different hostnames: choose one, configure it once, and do not mix them between staging and production. A base URL that already contains /chat/completions will produce a doubled path and a 404.

Compatibility matrix

“Supported” means the surface is documented and is the intended way to use the API. “Test first” means the endpoint exists but the behaviour you need may depend on fields or state that are not documented to the same level. “Not in catalogue” means the 39 public model IDs do not include that modality.

Plugsky OpenAI compatibility by surface, checked 20 November 2026
SurfaceStatusWhat to expect
Chat CompletionsSupportedPOST /v1/chat/completions with standard roles, temperature, top_p, max_tokens and stop sequences. Use an exact plugsky-* ID.
StreamingSupportedstream: true returns server-sent events in the OpenAI chunk shape. Text arrives in choices[0].delta.content; empty deltas are normal.
Tool callingSupportedStandard OpenAI function schema through tools and tool_choice. Validate arguments in your code; the model proposes, it does not authorise.
JSON modeSupportedresponse_format: {"type": "json_object"}, with the word “JSON” present in the prompt and defensive parsing after the call.
Structured outputsTest firstA strict json_schema response format is not documented with the same guarantees as JSON mode. Treat schema adherence as a test item, not an assumption.
EmbeddingsSupportedPOST /v1/embeddings with three IDs, 2,048 dimensions and an 8,192-token input window.
Responses APITest firstPOST /v1/responses responds. Stateful fields, background mode and OpenAI-hosted tools are not documented to Chat Completions depth.
Model listSupportedGET /v1/models returns the 39 public IDs. It is the authoritative list; do not pin a model from an old blog post.
Images, audio, videoNot in catalogueThe public catalogue is chat, vision-input and embedding models. Do not expect image generation, transcription or video endpoints to be drop-in surfaces.
Assistants and vector storesNot documentedThese are OpenAI product surfaces, not part of the compatible API contract. Build retrieval in your own stack instead.
Prompt cachingNot publishedNo cache-control contract is published, so do not plan savings from cached input.

Models, context and output ceilings

The catalogue contains 39 public model IDs. Most text models serve a 262,144-token context; plugsky-mistral-medium and the vision models serve 131,072; plugsky-translate and plugsky-gpu-27b serve 32,768; the embedding models accept 8,192 input tokens. Context is shared between input and output, so a prompt that fills the window leaves no room for an answer.

The plan and the model each impose a ceiling, and the lower one wins. Hobby allows 64K input and 8K output, Starter 128K input and 16K output, Builder 256K input and 32K output, and Scale a 512K plan input ceiling with 32K output; the individual model’s own context and output limits still apply. Set max_tokens deliberately and trim history before the request, not after the 400.

Several IDs are legacy compatibility names. plugsky-kimi, plugsky-deepseek-pro and plugsky-llama4, for example, are public IDs served by the same class of engine as the frontier aliases, not by the vendor named in the ID. Read x-plugsky-served-model at the HTTP layer when you need the actual engine behind an alias, and see the model catalogue for the full mapping.

What breaks during migration

Most failures are not model-quality problems. They are assumptions carried over from OpenAI that no longer hold at the new host. These are the ones worth testing before cutover.

  1. OpenAI model IDs. gpt-4o, gpt-4.1 and o3 are not Plugsky IDs. A request with one returns model_not_found; map every model string to a plugsky-* value and keep the mapping in configuration, not in code.
  2. The base URL path. A base URL without /v1, or one that already ends in /chat/completions, produces a 404 that looks like a missing endpoint. Use https://api.plugsky.com/v1.
  3. OpenAI-only parameters. Fields such as max_completion_tokens, store, metadata and service_tier are part of the OpenAI platform, not the compatibility contract. Sending them may be ignored or rejected; remove them unless a test proves the route honours them.
  4. Strict JSON schema. JSON mode is supported; strict structured outputs are a test item. If your parser assumes a schema guarantee, add validation and a retry before you rely on it.
  5. Stateful Responses. previous_response_id, background execution and hosted tools assume OpenAI’s state layer. Re-send conversation state from your own store until the behaviour is verified.
  6. Usage in streams. Do not assume the final SSE chunk contains usage. Read usage from a non-streamed call or a completed response when the number must be exact.
  7. Token counts. Client-side tiktoken estimates are OpenAI encodings. Plugsky does not publish a tokenizer, so treat local counts as planning estimates and the API’s reported usage as authoritative.
  8. Plan ceilings. A model with a 262K window can still be capped by a plan input limit. The 400 reports token counts; it is not a model outage.

Error table

Read the status code first, then the structured error.type and error.code. Do not branch on the human-readable message, which can change without notice.

Common migration errors, likely cause and the first fix to try
StatusCauseFix
401Missing, revoked or wrong-host keySend the Plugsky key as Authorization: Bearer; confirm the request did not fall back to api.openai.com.
403Key scope or plan does not include the surfaceCheck the key’s role and the plan; embeddings require an embeddings scope on paid keys.
404Wrong base path or unknown model IDUse https://api.plugsky.com/v1 and an ID from GET /v1/models.
400Malformed role, parameter or context overflowValidate the message array; trim input or lower max_tokens when the error reports token counts.
413Request body too largeChunk the document or send fewer messages per request.
429RPM, concurrency or daily quota exhaustedHonour Retry-After, add jittered backoff and reduce parallel requests.
500–503Server or upstream failure, possibly during failoverRetry with backoff; check status before changing code.

Migration path

The mechanical migration is small: install the same OpenAI SDK, set the base URL, replace the key and map the model IDs. The engineering migration is the part that needs a test plan, because streaming, tool calls, JSON parsing and long prompts each fail differently.

  1. Inventory the calls. List every OpenAI endpoint and parameter your code sends, including SDK helpers that hide a Chat Completions call.
  2. Set one base URL and one key path. Keep the host in configuration. Do not hard-code api.plugsky.com in ten services.
  3. Map model IDs. Replace each OpenAI ID with a Plugsky ID chosen by job: coding, long context, vision, translation or embeddings.
  4. Re-plan context. Reserve output tokens, cap history and check the plan ceiling before load testing.
  5. Test the four risky paths. Streaming, parallel tool calls, JSON parsing and a deliberate 429. If all four pass, the happy path is the easy part.
  6. Cut over behind a flag. Keep the old provider reachable until error rates and latency are stable, then remove the fallback.

The step-by-step command guide lives at /docs/migrate/openai-api. If you are comparing replacement routes rather than migrating an existing app, start with the drop-in replacement landing page, which covers the commercial and deployment differences rather than the wire format.

Where compatibility stops

Compatibility gets you to a working request. It does not give you OpenAI’s product surface. If your architecture depends on Assistants, vector stores, hosted file search, batch orchestration or image generation inside the same API, Plugsky is a partial fit: you keep the chat layer and move retrieval or media to another component.

The same rule applies to governance. Routing several providers behind one key, adding observability or central policy is a gateway problem, not a compatibility problem; the AI gateway overview explains that layer. Teams that need a dedicated endpoint, VPC peering or an air-gapped deployment should read private AI deployment and confirm scope in writing, because private deployment is contract-led rather than a self-serve toggle.

What we did not verify

  • We did not run latency, throughput or uptime benchmarks against Plugsky or OpenAI. No performance number on this page is a measurement.
  • We did not test every OpenAI SDK helper, every strict JSON schema or every stateful Responses field. The matrix marks those as test items rather than guarantees.
  • We did not review a SOC 2 report. Public material describes SOC 2 readiness; request the current report under NDA and confirm scope and period before relying on it.
  • We did not verify that third-party gateways preserve every field this page lists; a gateway can add its own transformations.
  • We used the API host https://api.plugsky.com/v1 throughout and noted the docs’ alternative host. Confirm the host in your account documentation before launch.

Frequently asked questions

Is Plugsky's API a drop-in replacement for OpenAI?

For the Chat Completions surface, usually yes: change the base URL, the API key and the model ID. It is not a drop-in replacement for every OpenAI product. Assistants, vector stores, hosted tools, image generation and audio are not part of the 39-model catalogue, and stateful Responses features need testing.

What base URL should I use?

Use https://api.plugsky.com/v1, including /v1 and without a trailing slash or /chat/completions. The OpenAI SDK appends the endpoint path itself. Plugsky's public docs also show https://plugsky.com/v1; pick one host and keep it across environments.

Which OpenAI SDK features work?

Chat Completions, streaming, tool calling, JSON mode and embeddings work through the standard OpenAI SDK. Exact public model IDs are required. Structured outputs with a strict JSON schema, stateful Responses features and OpenAI-only parameters should be tested before production.

How many models are available?

39 public model IDs. Most text models serve a 262,144-token context; plugsky-mistral-medium and the vision models serve 131,072, plugsky-translate and plugsky-gpu-27b serve 32,768, and the three embedding models accept 8,192 input tokens.

Do embeddings work with the OpenAI SDK?

Yes. plugsky-embed, plugsky-embed-nim and plugsky-embed-multilingual return 2,048-dimension vectors and accept up to 8,192 input tokens. Configure the vector store for 2,048 dimensions before ingesting, because changing dimension later means reindexing.

What causes a 404 after switching?

Two causes dominate: a base URL without /v1, or a model ID that Plugsky does not serve. Use https://api.plugsky.com/v1 as the base URL and call GET /v1/models to confirm the exact ID before pinning it.

Is streaming compatible?

Yes, with stream: true the API returns server-sent events in the OpenAI chunk shape. Do not assume every chunk carries text or that the final chunk carries usage; test your route and read usage from the completed response when you need exact counts.

Does Plugsky support the Responses API?

POST /v1/responses responds, and the endpoint is part of the public API surface. Stateful fields such as previous_response_id, background mode and OpenAI-hosted tools are not documented to the same level as Chat Completions, so test them before you depend on them.

Related pages

Test the SDK against Plugsky today

Start on the free plan with two keys and the Micro and Lite models, then move to a paid plan when concurrency and context ceilings matter.

Start Free → Read the docs

Sources

OpenAI behaviour below was checked on the linked documentation on 20 November 2026. Plugsky model and plan facts come from the public catalogue and pricing page. APIs change; recheck before quoting.

Official pages used for this compatibility guide
SourcePage checkedChecked
OpenAIplatform.openai.com — Chat Completions reference20 Nov 2026
OpenAIplatform.openai.com — Embeddings reference20 Nov 2026
OpenAIplatform.openai.com — Responses reference20 Nov 2026
OpenAIgithub.com — official OpenAI Python SDK20 Nov 2026
Plugskyplugsky.com/pricing and plugsky.com/models20 Nov 2026
Plugskyplugsky.com/docs and /docs/migrate/openai-api20 Nov 2026

Last checked 20 November 2026. Plugsky’s canonical plan numbers live at /pricing; this page explains compatibility and does not replace the API reference or the plan terms.