For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support
API ReferenceDocsRelease notes
API ReferenceDocsRelease notes
  • Analytics API Reference
        • POSTIdentify similar terms
        • GETSimilar terms supported languages
        • POSTGenerate vector embeddings
        • GETVector supported languages
Support
LogoLogo
Login
Login
Analytics API ReferenceText AnalyticsSemantic Vectors

Generate vector embeddings

POST
/semantics/vector
POST
/rest/v1/semantics/vector
$curl -X POST https://analytics.babelstreet.com/rest/v1/semantics/vector \
> -H "X-BabelStreetAPI-Key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "contentUri": "https://en.wikipedia.org/wiki/Cambridge,_Massachusetts"
>}'
200URI
1{
2 "documentEmbedding": [
3 1.1
4 ],
5 "tokenEmbeddings": [
6 1.1
7 ],
8 "tokens": [
9 "string"
10 ]
11}
Vector returns a single vector of floating point numbers for your input, representing the location of the input in semantic space. The length of the input can range from a single word to an entire document. Among other uses, a text vector enables you to calculate the similarity between two documents or two words.
Was this page helpful?
Previous

Vector supported languages

Next
Built with

Authentication

X-BabelStreetAPI-Keystring
API Key authentication via header
OR
X-RosetteAPI-Keystring
API Key authentication via header

Request

This endpoint expects an object.
contentstringOptional
contentUristringOptional
optionsobjectOptional

Response

OK
documentEmbeddinglist of doubles
document embeddings
tokenEmbeddingslist of doubles

per-token embeddings

tokenslist of strings
extracted tokens