Skip to main content
The Mixpeek Python SDK is auto-generated from our OpenAPI specification and always stays in sync with the latest API features.

Installation

Install via pip:
Requirements: Python 3.9+

Quick Start

Authentication

All API requests require authentication using a Bearer token:
You can create API keys in the Mixpeek dashboard under Organization Settings.

Core Operations

Collections

Retrievers

Adhoc Retrievers

Execute retrievers on-the-fly without creating them first:

Documents

Standalone Namespaces (Bring Your Own Vectors)

Standalone namespaces let you store and query precomputed vectors directly — no buckets, collections, or extractors required. This is the fastest path for agents that already have embeddings. The high-level Mixpeek client exposes the MVS primitives ergonomically; every call sends your namespace as the X-Namespace header automatically.
The removed POST /v1/search endpoint has been replaced by this retriever create + execute flow. Mixpeek.search(namespace_id=..., queries=[...]) is a shortcut that builds and runs an ephemeral feature_search retriever for you.

Read-your-writes after a direct upsert

A direct upsert is durable immediately, but retriever reads are eventually consistent by default. To read your own just-written document, pass the write_token from the upsert response back as the X-Write-Token header on execute — it routes the read to the primary shard and bypasses caches:

Promote to managed (auto-embedding)

Promote a standalone namespace to managed mode to map a vector index to an inference service. After promotion the same feature_search stage accepts input_mode: "text" and auto-embeds queries — no client-side embedding needed.
Before promotion, a standalone vector index has no inference mapping, so input_mode: "text" / "content" queries return an actionable 400 telling you to promote the namespace or use input_mode=vector with a precomputed embedding.

Error Handling

The SDK provides comprehensive error handling through ApiException:

Available APIs

The SDK includes these API classes:
  • AdhocRetrieversApi - Execute retrievers without saving them
  • AgentSessionsApi - Manage AI agent sessions
  • AlertsApi - Configure and manage alerts
  • AnalyticsApi - Access usage and performance analytics
  • BucketsApi - Manage object storage buckets
  • CollectionsApi - Manage document collections
  • DocumentsApi - Upload and manage documents
  • NamespacesApi - Manage multi-tenant namespaces
  • OrganizationsApi - Organization management
  • PluginsApi - Configure and manage plugins
  • RetrieversApi - Create and execute retrievers
  • TaxonomiesApi - Manage classification taxonomies
  • WebhooksApi - Configure webhook integrations

Configuration Options

Custom Host

Timeouts

Resources

PyPI Package

View on PyPI

GitHub Repository

Source code and issues

API Reference

Complete API documentation

OpenAPI Spec

OpenAPI specification

Next Steps

Quickstart

Get started with Mixpeek

JavaScript SDK

Use the JavaScript/TypeScript SDK

MCP Server

Use Mixpeek with AI assistants

Examples

View example implementations