Documentation

Create embeddings

POST
/api/v1/external/inference/embeddings

Creates a vector embedding for the provided input text. Only available with a Model API key. Body is proxied to liteLLM — validation is handled by the upstream provider.

AutorisationBearer <jeton>

Clé API d'organisation (model key ou agent key), créée depuis la console Oreus ou l'API Third-Party. Ce n'est pas le jeton OIDC.

Dans: header

Paramètres d’en-tête

x-oreus-user-authorization?string

Optionnel. Bearer <JWT d'organisation> de l'utilisateur connecté, obtenu via le flow OIDC avec les scopes read:inference / write:inference. Présent, l'appel est facturé à cet utilisateur en orbs plutôt qu'à l'organisation propriétaire de la clé API. Le jeton doit avoir été émis pour une application third-party de la même organisation que la clé.

Corps de requête

application/json

Définitions TypeScript

Utilisez le type request body en TypeScript.

input*

Text to embed, as a string or an array of strings

model*string

Model to use, as returned by GET /models

encoding_format?string

Format of the returned embeddings

Valeur parmi

  • "float"
  • "base64"
dimensions?number

Number of dimensions, when the model supports shortening

Corps de réponse

curl -X POST "https://example.com/api/v1/external/inference/embeddings" \  -H "Content-Type: application/json" \  -d '{    "model": "model-id",    "input": "The quick brown fox jumped over the lazy dog"  }'
Vide