POST
/
embeddings

Authorizations

authorization
string
header
required

token <token>, corresponds to temporary access tokens.

Body

application/json
k
integer
required

Number of related chunks to return.

Required range: x > 1
query
string
required

Query for which to get related chunks and embeddings.

Minimum length: 1
embedding_model
enum<string> | null

Embedding model that should be used to embed the query. For this to be effective, the files being searched must also have embeddings in Carbon that were generated by the same embedding model.

Available options:
OPENAI,
AZURE_OPENAI,
AZURE_ADA_LARGE_256,
AZURE_ADA_LARGE_1024,
AZURE_ADA_LARGE_3072,
AZURE_ADA_SMALL_512,
AZURE_ADA_SMALL_1536,
COHERE_MULTILINGUAL_V3,
VERTEX_MULTIMODAL,
OPENAI_ADA_LARGE_256,
OPENAI_ADA_LARGE_1024,
OPENAI_ADA_LARGE_3072,
OPENAI_ADA_SMALL_512,
OPENAI_ADA_SMALL_1536,
SOLAR_1_MINI
exclude_cold_storage_files
boolean
default:
false

Flag to control whether or not to exclude files that are not in hot storage. If set to False, then an error will be returned if any filtered files are in cold storage.

file_ids
integer[] | null

Optional list of file IDs to limit the search to

file_types_at_source
enum<string>[] | null

Filter files based on their type at the source (for example help center tickets and articles)

Available options:
TICKET,
ARTICLE,
CONVERSATION
high_accuracy
boolean | null
default:
false

Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.

Flag to control whether or not to perform hybrid search.

hybrid_search_tuning_parameters
object | null

Hybrid search tuning parameters. See the endpoint description for more details.

include_all_children
boolean
default:
false

Flag to control whether or not to include all children of filtered files in the embedding search.

include_file_level_metadata
boolean | null
default:
false

Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the content_metadata field of each document along with chunk/embedding level metadata.

include_raw_file
boolean | null

Flag to control whether or not to include a signed URL to the raw file containing each chunk in the response.

include_tags
boolean | null

Flag to control whether or not to include tags for each chunk in the response.

include_vectors
boolean | null

Flag to control whether or not to include embedding vectors in the response.

media_type
enum<string> | null
default:
TEXT

Used to filter the kind of files (e.g. TEXT or IMAGE) over which to perform the search. Also plays a role in determining what embedding model is used to embed the query. If IMAGE is chosen as the media type, then the embedding model used will be an embedding model that is not text-only, regardless of what value is passed for embedding_model.

Available options:
TEXT,
IMAGE,
AUDIO,
VIDEO
parent_file_ids
integer[] | null
deprecated

Optional list of parent file IDs to limit the search to. A parent file describes a file to which another file belongs (e.g. a folder)

query_vector
number[] | null

Optional query vector for which to get related chunks and embeddings. It must have been generated by the same model used to generate the embeddings across which the search is being conducted. Cannot provide both query and query_vector.

rerank
object | null

Parameters for reranking the chunks using a specified model. This field accepts an object with details of the reranking model to be used; either 'Cohere' or 'Jina'. If provided, the specified reranking model will reorder the retrieved chunks based on their relevance to the query.

tags
object | null

A set of tags to limit the search to. Deprecated and may be removed in the future.

tags_v2
object | null

A set of tags to limit the search to. Use this instead of tags, which is deprecated.

Response

200 - application/json
documents
object[]
required