RS Infer
Server Endpoints

/v1/embeddings

Create embeddings (OpenAI/vLLM compatible). Accepts either a string, an array of strings, an array of token ids, or an array of token-id arrays. Returns one embedding per input in `data`, ordered by the `index` field. `dimensions` performs Matryoshka truncation and re-normalizes. `encoding_format: "base64"` returns each vector as a little-endian f32 blob.

POST
/v1/embeddings

Create embeddings (OpenAI/vLLM compatible). Accepts either a string, an array of strings, an array of token ids, or an array of token-id arrays. Returns one embedding per input in data, ordered by the index field. dimensions performs Matryoshka truncation and re-normalizes. encoding_format: "base64" returns each vector as a little-endian f32 blob.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/embeddings" \  -H "Content-Type: application/json" \  -d '{    "model": "e5-small",    "input": "hello world"  }'
{  "object": "list",  "data": [    {      "object": "embedding",      "index": 0,      "embedding": [        0.1      ]    }  ],  "model": "string",  "usage": {    "prompt_tokens": 0,    "total_tokens": 0  }}