Create an encoder
POST/v2/encoders
Create a new encoder.
Request
Header Parameters
Possible values: >= 1
The API will make a best effort to complete the request in the specified seconds or time out.
Possible values: >= 1
The API will make a best effort to complete the request in the specified milliseconds or time out.
- application/json
Body
- CreateOpenAIEncoderRequest
- BearerAuth
- HeaderAuth
Default value: openai
Specifies this is an OpenAI encoder
The unique name of the encoder
A description of what this encoder does
Possible values: >= 1
The number of dimensions in the output embedding vector. If the encoder endpoint returns more dimensions than specified here, the response will be truncated to this number of dimensions.
The URL of the OpenAI-compatible embedding endpoint
The model name to use for embeddings
auth object required
Authentication configuration for an LLM
Default value: bearer
Must be "bearer" for bearer token auth
The bearer token to use for authentication
Default value: header
Must be "header" for header-based auth
The header name to use (e.g. x-api-key)
The header value to use
Responses
- 201
- 400
- 403
The encoder has been created
- application/json
- Schema
- Example (from schema)
Schema
Possible values: Value must match regular expression enc_[0-9]+$
The Encoder ID.
The encoder name, boomerang-2023-q3
.
Default value: vectara
The encoder type
When this encoder is used to create an embedding, it shows the count of dimensions for the output embedding. A high dimensionality will consume more storage space, but it allows for an increase in the quality of the embedding.
The encoder description.
Indicates whether the default encoder is used when creating a corpus.
Indicates whether the encoder is enabled.
{
"id": "enc_1",
"name": "boomerang-2023-q3",
"type": "vectara",
"output_dimensions": 768,
"description": "string",
"default": true,
"enabled": true
}
Encoder creation request was malformed.
- application/json
- Schema
- Example (from schema)
Schema
field_errors object
The errors that relate to specific fields in the request.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"field_errors": {},
"messages": [
"string"
],
"request_id": "string"
}
Permissions do not allow creating an encoder
- application/json
- Schema
- Example (from schema)
Schema
The messages describing why the error occurred.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"messages": [
"Internal server error."
],
"request_id": "string"
}