Skip to main content
POST
/
v1
/
embeddings
cURL
curl --request POST \
  --url https://proxy.innk.cc/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "The food was delicious and the waiter...",
  "encoding_format": "float",
  "dimensions": 123
}
'
{
  "object": "<string>",
  "data": [
    {
      "object": "<string>",
      "embedding": [
        123
      ],
      "index": 123
    }
  ],
  "model": "<string>",
  "usage": {
    "prompt_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

The authentication header format is Bearer <API_KEY>, where <API_KEY> is your API token.

Body

application/json
model
string
required

ID of the model to use

input
required

Text input to embed, which can be encoded as a string or an array of tokens. To embed multiple inputs in a single request, pass an array of string arrays or an array of token arrays. The input cannot exceed the model's maximum number of input tokens (8192 tokens for all embedding models), cannot be an empty string, and the dimension of any array must be 2048 or less. Example Python code for counting tokens. In addition to the token limit per input, all embedding models enforce a limit of 300,000 total tokens for all inputs in a single request.

Example:

"The food was delicious and the waiter..."

encoding_format
enum<string>

Returns the embedded format

Available options:
float,
base64
dimensions
integer

Output the number of dimensions of the embedding

Response

200 - application/json

Embedding vector

object
string
required

The object type is always "list".

data
object[]
required

List of embeddings generated by the model

model
string
required

The name of the model used to generate the embedding.

usage
object
required

Dosage