POST /v1/embed-jobs

This API launches an async Embed job for a Dataset of type embed-input. The result of a completed embed job is new Dataset of type embed-output, which contains the original text entries and the corresponding embeddings.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

X-Client-Name String No

The name of the project that is making the request.

Request body fields

Name Type Required Description
dataset_id String Yes

ID of a Dataset. The Dataset must be of type embed-input and must have a validation status Validated

input_type String Yes

Specifies the type of input passed to the model. Required for embedding models v3 and higher.

  • "search_document": Used for embeddings stored in a vector database for search use-cases.
  • "search_query": Used for embeddings of search queries run against a vector DB to find relevant documents.
  • "classification": Used for embeddings passed through a text classifier.
  • "clustering": Used for the embeddings run through a clustering algorithm.
  • "image": Used for embeddings with image input.

Possible values:

  • "search_document"
  • "classification"
  • "search_query"
  • "image"
  • "clustering"
name String No

The name of the embed job.

embedding_types[] Array No

Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.

  • "float": Use this when you want to get back the default float embeddings. Valid for all models.
  • "int8": Use this when you want to get back signed int8 embeddings. Valid for v3 and newer model versions.
  • "uint8": Use this when you want to get back unsigned int8 embeddings. Valid for v3 and newer model versions.
  • "binary": Use this when you want to get back signed binary embeddings. Valid for v3 and newer model versions.
  • "ubinary": Use this when you want to get back unsigned binary embeddings. Valid for v3 and newer model versions.
truncate String No

One of START|END to specify how the API will handle inputs longer than the maximum token length.

Passing START will discard the start of the input. END will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.

Possible values:

  • "START"
  • "END"

Default value: "END"

model String Yes

ID of the embedding model.

Available models and corresponding embedding dimensions:

  • embed-english-v3.0 : 1024
  • embed-multilingual-v3.0 : 1024
  • embed-english-light-v3.0 : 384
  • embed-multilingual-light-v3.0 : 384

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.