chroma-core/chroma · error · ChromaValueError
Missing API key. Please provide it to the CloudClient constr
Error message
Missing API key. Please provide it to the CloudClient constructor or set your CHROMA_API_KEY environment variable
What it means
Error "Missing API key. Please provide it to the CloudClient constructor or set your CHROMA_API_KEY environment variable" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/chromadb/src/cloud-client.ts:33
constructor(
args: Partial<{
/** API key for authentication (or set CHROMA_API_KEY env var) */
apiKey?: string;
/** Host address of the Chroma cloud server. Defaults to 'api.trychroma.com' */
host?: string;
/** Port number of the Chroma cloud server. Defaults to 443 */
port?: number;
/** Tenant name for multi-tenant deployments */
tenant?: string;
/** Database name to connect to */
database?: string;
/** Additional fetch options for HTTP requests */
fetchOptions?: RequestInit;
}> = {},
) {
const apiKey = args.apiKey || process.env.CHROMA_API_KEY;
if (!apiKey) {
throw new ChromaValueError(
"Missing API key. Please provide it to the CloudClient constructor or set your CHROMA_API_KEY environment variable",
);
}
const tenant = args.tenant || process.env.CHROMA_TENANT;
const database = args.database || process.env.CHROMA_DATABASE;
super({
host: args.host || "api.trychroma.com",
port: args.port || 443,
ssl: true,
tenant,
database,
headers: { "x-chroma-token": apiKey },
fetchOptions: args.fetchOptions,
});
// Override from ChromaClient construction in case undefined. This will trigger auto-resolution in the "path" functionView on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/chromadb/src/cloud-client.ts:33 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/b6cac3300283c7b9.
Report an issue: GitHub.