Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceInferenceEmbeddings

Turn text into vectors

Turns text into vectors for search, retrieval, clustering and deduplication in the OpenAI embeddings shape, served by openrelay/bge-m3 today. openrelay/bge-m3 is multilingual and returns 1024-dimension dense vectors; check a model's supported_apis on GET /v1/models for embeddings. Requires a funded balance. No output rate: billed only on usage.prompt_tokens. stream is dropped. Limits: 8192 tokens per input item, 1024 items per request, 10 MiB request body. Also runs through the Batch API at endpoint /v1/embeddings, at the batch rate.

Required permission

Requires the inference.invoke permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl embeddings create --input <input> --model <model>
POST
/v1/embeddings

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Request Body

application/json
  1. body

An OpenAI-compatible embeddings request. stream is dropped; a response is always a single JSON body.

model*string

An OpenRelay public model id, e.g. openrelay/bge-m3.

input*|array<string>

The text to embed. An array embeds each item independently and returns one vector per item, in order.

[key: string]?any

Response Body

OK

application/json
  1. response

An OpenAI embeddings list object (opaque; additionalProperties carries the rest of the dialect).

object?"list"
Value in"list"
data?array<>
model?string
usage?
openrelay?

What the request is billed, on every online inference response.

[key: string]?any
Example Request
curl -X POST 'https://inference.openrelay.inc/v1/embeddings' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "input": "string"}'
Example Response
{  "object": "list",  "data": [    {}  ],  "model": "string",  "usage": {},  "openrelay": {    "cost_nano_usd": 0,    "priced_at": "string"  }}