Skip to main content

Jina AI

Select a language

Chroma provides a convenient wrapper around JinaAI's embedding API. This embedding function runs remotely on JinaAI's servers, and requires an API key. You can get an API key by signing up for an account at JinaAI.

This embedding function relies on the requests python package, which you can install with pip install requests.

import chromadb.utils.embedding_functions as embedding_functions
jinaai_ef = embedding_functions.JinaEmbeddingFunction(
jinaai_ef(input=["This is my first text to embed", "This is my second document"])

You can pass in an optional model_name argument, which lets you choose which Jina model to use. By default, Chroma uses jina-embedding-v2-base-en.