Overview
Custom plugins let you run your own feature extraction logic on Mixpeek’s infrastructure. The framework handles batching, scaling, and GPU allocation - you write the processing code. Two deployment modes:- Batch processing (all accounts): Process files in collections
- Realtime inference (Enterprise): HTTP endpoint for live requests
Quick Start
Plugin Structure
manifest.py
Defines what your plugin accepts and produces:processors/core.py
Your processing logic:pipeline.py
Wire processor into the pipeline:realtime.py (Enterprise)
For HTTP inference endpoint:API Reference
Upload Plugin (Presigned URL)
Step 1: Get upload URLDeploy Plugin (Enterprise)
Check Status
| Status | Meaning |
|---|---|
QUEUED | Waiting in deployment queue (max 30s) |
PENDING | Deployment triggered, waiting for Anyscale |
IN_PROGRESS | Blue-green rollout happening |
DEPLOYED | Ready for realtime inference |
FAILED | Check error field |
NOT_DEPLOYED | Batch-only, no realtime endpoint |
Delete Plugin
deployment_removed: true if Ray Serve endpoint was queued for removal.
Resource Types
| Type | Use For | Auto-config |
|---|---|---|
ResourceType.CPU | Text embeddings, classification | Batch size ~64 |
ResourceType.GPU | Local models (Whisper, CLIP) | Batch size ~8, GPU allocation |
ResourceType.API | External APIs (OpenAI, Vertex) | Concurrent requests |
Row Conditions
Filter which rows your processor handles:Using Built-in Services
Compose existing services instead of writing from scratch:Security Requirements
Plugins are scanned using AST analysis before upload confirmation. Code that violates these rules will be rejected.Allowed Imports
These libraries are safe to use in your plugins:| Category | Libraries |
|---|---|
| Data Processing | numpy, pandas, polars, pyarrow |
| ML/AI | torch, transformers, sentence_transformers, onnxruntime, safetensors |
| Image Processing | PIL/pillow, cv2/opencv-python, imageio |
| Audio/Video | librosa, soundfile, ffmpeg-python |
| HTTP Clients | requests, httpx, aiohttp |
| Utilities | json, re, typing, dataclasses, pydantic, logging |
| Mixpeek SDK | shared.models.loader.load_namespace_model |
Forbidden Imports
These imports are blocked for security reasons:| Category | Blocked | Reason |
|---|---|---|
| Process Execution | subprocess, os.system, os.popen, os.spawn*, os.exec* | Shell execution |
| Low-level Access | ctypes, pty, fcntl, resource | Memory/system access |
| Concurrency | multiprocessing, threading | Use Ray instead |
| Network | socket | Use requests/httpx instead |
| Legacy | commands, popen2 | Deprecated Python 2 modules |
Forbidden Builtins
These built-in functions cannot be used:| Function | Reason |
|---|---|
eval(), exec(), compile() | Dynamic code execution |
open() | Direct file access (use provided APIs) |
__import__() | Dynamic imports |
globals(), locals(), vars() | Namespace manipulation |
getattr(), setattr(), delattr(), hasattr() | Attribute manipulation |
Forbidden Module Functions
| Module | Blocked Functions |
|---|---|
os | system, popen, spawn, exec, fork, kill, killpg |
importlib | import_module, __import__ |
pickle | loads, load (arbitrary code execution risk) |
marshal | loads, load |
Warning Patterns
These patterns generate warnings and may fail in strict mode:pickle,marshal,shelveusage- Dunder attribute access:
__builtins__,__class__,__bases__,__subclasses__,__mro__,__code__,__globals__
Validation Errors
If your plugin fails validation, the API returns:Feature URI
After deployment, reference your plugin with:Namespace Isolation
Plugins are isolated per namespace:- MongoDB:
internal_idscoping ensures org isolation - S3: Archives stored at
org_id/ns_id/plugin_custom/... - Ray Serve: Deployment names include namespace prefix to prevent collisions
CLI Commands
| Command | Description |
|---|---|
mixpeek plugin init <name> | Create plugin from template |
mixpeek plugin test | Validate and test locally |
mixpeek plugin publish | Upload to namespace |
mixpeek plugin list | List plugins in namespace |

