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
Themixpeek 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.
Resources on the Mixpeek client
Resources on the Mixpeek client
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.Create a namespace: managed or standalone
Create a namespace: managed or standalone
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
Errors
Errors
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.Generated API classes
Generated API classes
List collections with the generated client
configuration.timeout for a longer request timeout.JavaScript SDK
Themixpeek 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.
Sub-clients
Sub-clients
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.REST API
Every endpoint takes JSON over HTTPS athttps://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.
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 athttps://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.
