Skip to main content

Embedding API

Text vectorization service based on BAAI/bge-small-zh-v1.5 model.

Endpoints

MethodPathAuth
POST/embedBearer Token
GET/healthNone

Request Parameters

ParamTypeDescription
textsstring arrayList of texts to vectorize

Response Fields

FieldTypeDescription
embeddingsfloat[][]512-dimension vectors
modelstringModel name
tokens_usedintegerTokens consumed

Quick Test

Get token:

curl -X POST https://api.hubnode.uk/oauth2/token -H 'Content-Type: application/json' -d 'client_id=YOUR_ID&client_secret=YOUR_SECRET&grant_type=client_credentials'

Call API:

curl -X POST https://api.hubnode.uk/embed -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json' -d 'texts=hello+world'