v3

latestOpenAPI 3.0.02026-08-081996601.2 MB
Encoders

Create an encoder

Creates a new encoder.

post/v2/encoders

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Request body

OR

Example request

{
  "name": "openai-text-encoder",
  "description": "Text encoder for product catalog search",
  "uri": "https://api.openai.com/v1/embeddings",
  "model": "text-embedding-ada-002",
  "auth": {
    "type": "bearer",
    "token": "abcdef......"
  }
}

Response

The created encoder.

idstring required

The Encoder ID.

namestring required

The encoder name, for example boomerang-2023-q3.

typestring

The encoder type

output_dimensionsinteger

The number of dimensions in the output embedding. A high dimensionality consumes more storage space but can increase the quality of the embedding.

descriptionstring

The encoder description.

defaultboolean

Indicates whether this is the default encoder used when you create a corpus.

enabledboolean

Indicates whether the encoder is enabled.

image_encodingboolean

Whether this encoder can produce embeddings for images, either of an image alone or jointly with accompanying text.

Example response

{
  "id": "enc_1",
  "name": "openai-text-encoder",
  "type": "openai-compatible",
  "output_dimensions": 1536,
  "default": true,
  "enabled": true
}