Skip to main content
Mixpeek ships two SDKs generated from the OpenAPI spec, a command-line tool for Apps, and a plain REST API that every tool wraps. Every tool sends the same two headers: Authorization: Bearer $MIXPEEK_API_KEY and, for anything inside a namespace, X-Namespace: $NAMESPACE_ID. The examples below read both from the environment.
Set credentials once

Python SDK

The mixpeek package has two layers. The Mixpeek client covers the common resources with short method names and returns plain dicts. The generated API classes (mixpeek.RetrieversApi, mixpeek.CollectionsApi and so on) cover every endpoint with typed request models. Start with Mixpeek and drop to the generated classes for endpoints it does not wrap.
Shell
Run a retriever
The client retries a 429 or 503 response after the wait the server advises (Retry-After), or a backoff from 2 seconds that doubles; other errors raise at once. Responses support both run["documents"] and run.documents.
A method’s keyword arguments become the JSON body, so client.collections.create(collection_name="scenes", source={"type": "bucket", "bucket_ids": ["bkt_replace_me"]}, features=["video_search"]) sends those three fields. A namespace_id= or namespace= keyword is moved to the X-Namespace header for that call.
client.namespaces.create picks the mode from its arguments. vector_configs= creates a standalone namespace for your own vectors. feature_extractors=, or just a name (name= or namespace_name=), creates a managed namespace. Pass mode="managed" or mode="standalone" to choose it yourself.
Both kinds of namespace
Writing and searching your own vectors is covered in Bring your own vectors.
The Mixpeek client raises MixpeekAPIError (from mixpeek import MixpeekAPIError) for a non-2xx response it did not retry away.The generated API classes raise mixpeek.rest.ApiException with status, reason and body.
List collections with the generated client
Each class matches one group in the API reference, and each method takes the path, query and body fields that endpoint declares. Set configuration.timeout for a longer request timeout.
Source and issues: github.com/mixpeek/python-sdk. Package: pypi.org/project/mixpeek.

JavaScript SDK

The mixpeek npm package is a TypeScript client generated from the OpenAPI spec, with CommonJS and ES module builds. new Mixpeek() exposes one typed sub-client per API group, such as client.retrievers, client.collections, client.buckets and client.tasks. Each method takes one object of named parameters and returns an Axios response, so read the body from .data.
Shell
Run a retriever
client.setApiKey() and client.setNamespace() change the credentials on an existing client. Method names follow the API reference titles in camel case, for example listCollections, createRetriever and getTask.
collections, collectionDocuments, collectionSchema, collectionLifecycle, collectionTaxonomies, retrievers, retrieverStages, retrieverInteractions, publishedRetrievers, adhocRetrievers, documents, buckets, bucketObjects, bucketUploads, bucketSyncs, bucketBatches, batches, namespaces, organizations, organizationApiKeys, taxonomies, clusters, clusterExecutions, alerts, agents, apps, featureExtractors, webhooks, tasks, health, analytics.
Package: npmjs.com/package/mixpeek.

REST API

Every endpoint takes JSON over HTTPS at https://api.mixpeek.com/v1. Use it from any language, or when an SDK does not yet wrap an endpoint. The OpenAPI spec is at https://api.mixpeek.com/docs/openapi.json.
Read documents, status and warnings on every retriever run; list endpoints return results and a next_cursor to page with. See Concepts and Execute retriever.

mixpeek CLI

@mixpeek/cli installs a mixpeek command that scaffolds, runs and deploys Apps from your terminal. It needs Node.js 18 or later. It reads the app id from mixpeek.config.json in the current directory, which mixpeek apps init writes.
Log in and deploy an app
Before deploy, logs, publish or rollback will run, set app_id in mixpeek.config.json to the id of an app you created. Apps covers creating one.
The CLI has no plugin or extractor commands. To build and publish your own extractor, see Custom extractors and models.

MCP server

The hosted MCP server at https://mcp.mixpeek.com/mcp exposes 104 Mixpeek tools to AI agents with no install. Add it to Claude Code, Claude Desktop, Cursor, Codex or Gemini CLI. See Agents and MCP.