Embed API (v2)
Authentication
Bearer authentication of the form Bearer <token>
, where token is your auth token.
Headers
Request
ID of one of the available Embedding models.
An array of strings for the model to embed. Maximum number of texts per call is 96
.
An array of inputs for the model to embed. Maximum number of inputs per call is 96
. An input can contain a mix of text and image components.
The maximum number of tokens to embed per input. If the input text is longer than this, it will be truncated according to the truncate
parameter.
The number of dimensions of the output embedding. This is only available for embed-v4
and newer models.
Possible values are 256
, 512
, 1024
, and 1536
. The default is 1536
.
Response
An object with different embedding types. The length of each embedding type array will be the same as the length of the original texts
array.