POST
/
api
/
v1
/
embeddings
Create Embedding
curl --request POST \
  --url https://api.intelligence.io.solutions/api/v1/embeddings \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "input": [
    123
  ],
  "encoding_format": "\"float\"",
  "dimensions": 123,
  "user": "<string>",
  "truncate_prompt_tokens": 123,
  "additional_data": "<string>",
  "add_special_tokens": true,
  "priority": 0
}'
"{\n  \"id\": \"0194e037-96b9-a92c-5f0b-ac43152g2679\",\n  \"object\": \"list\",\n  \"created\": 1738928526,\n  \"model\": \"mixedbread-ai/mxbai-embed-large-v1\",\n  \"data\": [\n    {\n      \"index\": 0,\n      \"object\": \"embedding\",\n      \"embedding\": [\n        -0.017547607421875,\n        -0.10943603515625,\n        -0.40771484375,\n        0.308837890625,\n        ...\n        -0.161376953125,\n        0.42041015625,\n        0.39404296875\n      ]\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 12,\n    \"total_tokens\": 12,\n    \"completion_tokens\": 0,\n    \"prompt_tokens_details\": null\n  }\n}"

Body

application/json
model
string
required

ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.

input
integer[]
required

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. Some models may also impose a limit on total number of tokens summed across inputs.

encoding_format
string
default:"float"

The format to return the embeddings in. Can be either float or base64.

dimensions
integer

The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

user
string

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

truncate_prompt_tokens
integer
additional_data
string

Any or Null

add_special_tokens
boolean
default:true

If true (the default), special tokens (e.g. BOS) will be added to the prompt.

priority
integer
default:0

The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.

Response

200

The response is of type any.