Skip to content

OpenAI Embeddings ​

Text embeddings API converts text into high-dimensional vector representations for semantic search, text classification, and clustering.

Endpoint ​

MethodEndpoint
POSThttps://neolink.com/api/v1/embeddings

Authentication ​

MethodDescription
Bearer TokenInclude Authorization: Bearer <API_key> in the request header for account verification.

Request Headers ​

ParameterTypeRequiredDescription
Content-TypestringYesMedia type of the request body, set to application/json
AuthorizationstringYesBearer API_key for account verification

Request Body ​

ParameterTypeRequiredDefaultDescription
modelstringYes-Model ID to use
inputstring or arrayYes-Input text to convert to vectors. Can be a single string or an array of strings (batch processing)
encoding_formatstringNofloatEncoding format for returned vectors. Options: float or base64
dimensionsintNo-Number of dimensions for returned vectors. Only supported by some models
userstringNo-Unique identifier for the end-user, used for monitoring and abuse detection

Request Example ​

bash
curl --location --request POST 'https://neolink.com/api/v1/embeddings' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer <API Key>' \
     --data-raw '{
         "model": "<Model ID>",
         "input": "What is artificial intelligence"
     }'
python
import requests

url = "https://neolink.com/api/v1/embeddings"

headers = {
    "Authorization": "Bearer <API Key>"
}

files = {
    "model": (None, "<Model ID>"),
    "input": (None, "What is artificial intelligence"),
}

response = requests.post(url, headers=headers, files=files)

print(response.status_code)
print(response.text)

Supported Models:

  • text-embedding-3-large
  • text-embedding-3-small
  • text-embedding-ada-002
  • text-embedding-v4