Use Cases + Implementation

How do you build knowledge assistants with an OpenAI-compatible API?

An OpenAI-compatible API turns a knowledge base into an answering service with minimal change: point your SDK at api.plugsky.com, use /v1/embeddings to index articles and /v1/chat/completions to answer with citations. Streaming, JSON mode and function calling are live, so your existing pipeline keeps its code shape while gaining one endpoint for both retrieval and generation.

Key facts

API compatibilityOpenAI-shaped /v1/embeddings and /v1/chat/completions (live)
Embeddingsplugsky-embed and plugsky-embed-multilingual (live)
Answer featuresStreaming, JSON mode and function calling (live)
Models30+ models behind one endpoint, route by article complexity
MigrationBase URL and model-name change; re-embed into a new collection
PricingFlat monthly plans with unlimited fair-use usage on self-serve
ResidencyRegion-locked planes, VPC, on-prem and air-gapped options
Free tierplugsky-micro and plugsky-lite on the free plan, no card required

TL;DR

  • One compatible endpoint can serve both indexing and answering for your knowledge base.
  • Re-embed the corpus when you switch providers — vector spaces do not mix.
  • Return JSON with answer, sources and confidence so the UI can render citations.
  • Keep filtering and ranking in your code where content rules live.
  • Shadow-run against current search before switching employee-facing traffic.

How it works, step by step

  1. Wrap embedding and chat calls in a thin client so the provider is configuration.
  2. Create a scoped Plugsky key and set the base URL to https://api.plugsky.com/v1.
  3. Re-embed all articles with plugsky-embed (or plugsky-embed-multilingual) into a new vector collection.
  4. Update the answer call to request JSON with fields for answer, sources and confidence.
  5. Apply product, locale and permission filters before retrieval, exactly as your search does today.
  6. Run both stacks on real questions and compare citation accuracy and resolution rate.
  7. Switch traffic by configuration, and monitor usage and error rates for the first week.
1Wrap embedding andchat calls in athin client so the2Create a scopedPlugsky key and setthe base URL to3Re-embed allarticles withplugsky-embed (or4Update the answercall to requestJSON with fields5Apply product,locale andpermission filters6Run both stacks onreal questions andcompare citation

Try it yourself

Open the embedding model comparison →

Compatibility for knowledge pipelines

A knowledge assistant has exactly two model-shaped calls: embed content for indexing and generate answers from retrieved passages. Both are OpenAI-shaped on Plugsky and both are live, which means the migration surface for an existing pipeline is a client base URL and a model name.

Adjacent operations remain in your code for now. Files, batch and assistants-style endpoints are coming soon, so keep bulk ingestion, scheduled re-indexing and conversation state in your application rather than waiting on managed equivalents.

Embeddings, retrieval and cited answers

Indexing is a backfill: walk the corpus, chunk by article and section, embed each chunk, and write vectors plus metadata. Answering is a read path: embed the question, filter by product and locale, retrieve top passages, and generate a response constrained to them.

  • One model for both sides: always embed queries with the same model that embedded the documents.
  • Structured output: JSON mode gives the UI an answer object plus a sources array with IDs and links.
  • Refusals: instruct the model to say when the corpus lacks an answer, then surface the nearest articles.
  • Freshness: store updated dates so stale articles can be demoted at ranking time.

Operations and rollout

Treat the assistant as a service: separate keys for indexing and answering, usage alerts on both, and logs that record retrieved chunk IDs per request. Because retrieval quality is visible in those logs, relevance complaints can be traced rather than guessed at.

Shadow-run new retrieval and prompts against live traffic and compare citation accuracy, resolution rate and zero-result queries before switching. Residency, if required, applies to the documents carried in prompts: pin the workspace to a region-locked plane or deploy to VPC, on-prem or air-gapped. Keeping provider selection in configuration makes future moves and rollbacks routine deploys.

Honest comparison

LayerPlugskyStaying on OpenAISelf-hosted models
Client codeBase URL and model names onlyNo changeNew serving stack
Embeddingsplugsky-embed and plugsky-embed-multilingual (live)Existing modelYou operate the server
Answer formatJSON mode with sources and confidenceAvailableBuilt by you
PricingFlat monthly with unlimited fair use on self-servePer-tokenGPU and ops cost
ResidencyRegion choice, VPC, on-prem, air-gappedLimited optionsWherever you deploy

Frequently asked questions

Can the same endpoint handle indexing and answering?

Yes. /v1/embeddings handles indexing and /v1/chat/completions handles answers, both in OpenAI format, so one client and one key can serve the whole pipeline.

Why re-embed when switching providers?

Embedding vectors are model-specific. Similarity search only works when documents and queries share a vector space, so backfill a new collection before switching reads.

How do we return citations?

Use JSON mode to require an answer field and a sources array of chunk or article IDs. Your service maps those IDs to titles and canonical URLs.

Where do content rules live?

In your retrieval code: product, locale, permission and freshness filters are applied before passages reach the model. That keeps policy out of prompt wording.

Is streaming available?

Yes, streaming is live on chat completions, so answers render progressively while retrieval happens ahead of the call.

Can this run on-prem?

Yes. Plugsky supports region-locked cloud planes plus VPC, on-prem and air-gapped deployment for content that cannot leave your environment.

How should we trial the migration?

Start on the free plan with plugsky-micro and plugsky-lite and no card, shadow-run against real questions, then move to a paid plan or the 14-day full-access trial.