API Reference

Documentation

Everything you need to integrate Pawan.Krd into your application.

Embeddings

Convert text into dense vector representations for semantic search, RAG, clustering and similarity. Compatible with the OpenAI Embeddings API.

POST/v1/embeddings

Single input

📋Request
1{ 2 "model": "your-embedding-model", 3 "input": "The quick brown fox jumps over the lazy dog", 4 "encoding_format": "float" 5}

Batched input

Send an array of strings to embed many inputs in one round-trip:

📋Batched request
1{ 2 "model": "your-embedding-model", 3 "input": [ 4 "First document", 5 "Second document", 6 "Third document" 7 ] 8}

Parameters

model
stringrequired
Embedding model id (type: embedding).
input
string | string[]required
Text to embed. Send an array to embed multiple inputs in a single call.
dimensions
integer
Truncate output vectors to this many dimensions. Requires a matryoshka model.
encoding_format
string
"float" (default) or "base64".
user
string
End-user identifier for analytics.

Response

📋200 OK
1{ 2 "object": "list", 3 "data": [ 4 { 5 "object": "embedding", 6 "index": 0, 7 "embedding": [0.0023, -0.018, 0.041, ...] 8 } 9 ], 10 "model": "your-embedding-model", 11 "usage": { "prompt_tokens": 10, "total_tokens": 10 } 12}
✓

Matryoshka models

Models with the matryoshka capability accept a dimensions parameter to truncate the output vector while preserving semantic quality — handy for reducing storage and search latency.