API Reference
Embeddings
Generate vector embeddings for text using OpenAI embedding models via the Plurence gateway.
Endpoint
POST https://gateway.plurence.com/v1/embeddings Request body
| Field | Type | Description |
|---|---|---|
| model | string | Required. e.g. text-embedding-3-small, text-embedding-3-large. |
| input | string | array | Required. Text or list of texts to embed. |
| encoding_format | string | float (default) or base64. |
| dimensions | integer | Reduce output dimensions. Model-dependent. |
Example
python
from openai import OpenAI
client = OpenAI(
api_key="plr_live_...",
base_url="https://gateway.plurence.com/v1",
)
result = client.embeddings.create(
model="text-embedding-3-small",
input="The quick brown fox jumps over the lazy dog",
)
vector = result.data[0].embedding
print(f"Dimensions: {len(vector)}") # 1536 See the full interactive reference with live examples.
code API Explorer