New is_query Parameter on the Embed APIs for Optimised Retrieval Vectors

· API · Improvement · All updates

A query and a document are not the same kind of text, and embedding them identically costs you retrieval quality. The embed and batch embed endpoints now take an is_query parameter.

01 One parameter, two roles

Set is_query=1 when the text you are embedding is a search query rather than a document. You get a vector optimised for retrieval against the vectors you stored at index time. Leave it off, as before, when you are embedding content to be stored.

ValueUse it for
is_query=1Embedding a search query — returns an optimised retrieval vector.
omittedEmbedding content for indexing, exactly as before.
The parameter is available on both the single embed endpoint and the batch embed endpoint.
View the full changelog