Developer + API

How do you use Plugsky embeddings for semantic search and recommendations?

Plugsky embeddings turn text into vectors on the OpenAI-compatible POST /v1/embeddings endpoint using models like plugsky-embed, plugsky-embed-multilingual and plugsky-embed-nim. Embed your corpus once, store the vectors with metadata in any vector store, then query by nearest neighbour for semantic search, RAG retrieval, deduplication and recommendation. Read the live dimension from /models before creating the collection.

Key facts

EndpointPOST https://api.plugsky.com/v1/embeddings (OpenAI-compatible)
Modelsplugsky-embed, plugsky-embed-multilingual, plugsky-embed-nim
Example dimensionThe docs quickstart prints 2048 dimensions for plugsky-embed
Input handlingBatch multiple strings per call; chunk long documents to the advertised window
Use casesSemantic search, RAG retrieval, clustering, deduplication, recommendations
StorageAny vector store — pgvector, Pinecone, Qdrant, Weaviate, Milvus
PII defaultEmbeddings default to the no-PII mode with automatic redaction
Product statusLive

TL;DR

  • Embed with /v1/embeddings; the model name is the only change from OpenAI.
  • Match your collection dimension to the live value on /models.
  • Chunk by structure and store metadata so results can cite sources.
  • Pair vector search with keyword search for identifiers and rare terms.
  • Use plugsky-embed-multilingual when the corpus mixes Arabic and English.

How it works, step by step

  1. Read the chosen model's live card on /models for dimension and input limit.
  2. Create the vector collection with that exact dimension and a metadata schema.
  3. Chunk documents by structure — headings, paragraphs, code blocks — not fixed character counts.
  4. Embed in batches with POST /v1/embeddings and upsert vectors plus source metadata.
  5. Query with the same model and retrieve the top-k nearest neighbours.
  6. Add keyword search or a reranker for precision on names, codes and error strings.
  7. Monitor retrieval quality and re-index whenever the embedding model changes.
1Read the chosenmodel's live cardon /models for2Create the vectorcollection withthat exact3Chunk documents bystructure —headings,4Embed in batcheswith POST/v1/embeddings and5Query with the samemodel and retrievethe top-k nearest6Add keyword searchor a reranker forprecision on names,

Try it yourself

Open the embedding model comparison →

The embeddings call

The API mirrors OpenAI, so existing embedder code changes one field:

from openai import OpenAI
client = OpenAI(api_key="sk-live-…", base_url="https://api.plugsky.com/v1")

resp = client.embeddings.create(
    model="plugsky-embed",
    input=["Plugsky is a sovereign AI cloud", "GCC banks run on us"],
)
print(len(resp.data[0].embedding), "dimensions")

Batch multiple passages per request to cut round trips during indexing. The same call serves query-time embedding, which matters: mixing models between indexing and querying is a common and silent retrieval bug.

Semantic search architecture

Three layers keep semantic search predictable: indexing, retrieval and ranking.

  • Indexing: chunk by structure, embed each chunk, and store source, title, section and timestamp as metadata.
  • Retrieval: embed the query with the same model, then fetch top-k by cosine similarity or dot product, with a metadata filter for tenancy and freshness.
  • Ranking: combine vector scores with keyword results — hybrid search — and optionally rerank the top candidates before they reach the model.

Partition by tenant from day one. A single shared collection that filters at query time is harder to secure and to delete from when a customer leaves.

Recommendations and clustering

Recommendations reuse the same vectors. For content recommendation, average or pool embeddings of items a user engaged with, then search for neighbours excluding what they have already seen. For product recommendation, embed catalogue descriptions and enrich the query with structured filters such as stock and price band. Clustering embeddings with k-means or HDBSCAN surfaces topic groups and near-duplicates without any labels, which is useful for deduplicating support tickets or catalogue entries.

Choosing a Plugsky embedding model

Start with plugsky-embed for English-dominant corpora. Switch to plugsky-embed-multilingual when queries and documents mix languages such as Arabic and English, and to plugsky-embed-nim if your pipeline standardises on NIM-style naming. Keep one model per collection, record the model name and dimension in your schema, and re-index as a background job when you change models. Same-profile peers in the embed family provide automatic fallback during incidents, so long indexing jobs are not lost to one provider's bad hour.

Honest comparison

CapabilityPlugsky embeddingsTypical embeddings APISelf-hosted embeddings
EndpointOpenAI-compatible /v1/embeddingsVaries by vendorYou run the server
Model choiceplugsky-embed family plus catalogue modelsUsually one or two modelsWhatever weights you host
Multilingualplugsky-embed-multilingual for mixed corporaOften English-firstDepends on weights
Ops overheadNoneNoneGPU capacity and upgrades
PII postureNo-PII default for embeddingsVariesYou implement redaction
FailoverSame-profile peers in the embed familyProvider-dependentYou design it

Frequently asked questions

Which Plugsky model should I use for embeddings?

plugsky-embed is the default for English-dominant corpora; plugsky-embed-multilingual suits mixed-language content such as Arabic and English; plugsky-embed-nim fits NIM-style pipelines. Pick one per collection.

What is the embedding dimension?

The live dimension is published per model at /models, and the docs quickstart shows a 2048-dimension example for plugsky-embed. Read the current value before creating a collection.

Can I use Plugsky embeddings with pgvector?

Yes. The API returns plain numeric vectors, so any vector store — pgvector, Pinecone, Qdrant, Weaviate or Milvus — works once the collection dimension matches.

Do embeddings support batch inputs?

Yes. Pass an array of strings to POST /v1/embeddings to embed many passages per call, which is the fastest way to index a corpus.

How is semantic search different from keyword search?

Keyword search matches exact tokens; semantic search matches meaning, so synonyms and paraphrases still rank. Hybrid retrieval combines both and is usually the strongest default.

Does Plugsky use my data to train models?

Embeddings default to the no-PII mode with automatic redaction, and training-use commitments are defined in the platform terms. Confirm the current wording at /legal/terms for your diligence file.

What happens if the embedding endpoint has an incident?

Requests fall back to same-profile peers in the embed family automatically. Live component health is published on the status page.

Are embeddings included in self-serve plans?

Embeddings are part of platform usage. Self-serve plans are flat monthly with fair-use usage; see the live pricing page for current plan details.