Authentication
- Header:
Authorization: Bearer <api_key> - API keys belong to an organization; keys can be rotated, revoked, or scoped per environment.
- Sensitive operations (e.g., creating namespaces, rotating keys) require elevated permissions.
read/write/delete/admin permissions and resource scopes, rotating and revoking, per-key rate limits, usage attribution, and end-user (principal_id) keys.
Namespace Isolation
- Header:
X-Namespace: <namespace_id or namespace_name> - Every MongoDB query filters on
namespace_id; indexes ensure isolation at scale. - MVS uses one namespace per namespace (
ns_<namespace_id>); payload filters ensure cross-namespace safety. - Redis cache keys and Ray job metadata include namespace identifiers.
Dual Identifier Model
Keep
internal_id secret; it is intentionally absent from public APIs.
Authorization & Rate Limits
- Routes declare required permission levels (
read,write,delete,admin). - Rate limits enforced via Redis middleware; set per-plan and per-route to protect backends.
- Tasks and retriever executions are metered in dollars; analytics endpoints expose usage metrics for billing reconciliation.
Secrets & Credentials
Mixpeek provides an encrypted secrets vault for storing sensitive credentials like API keys. Secrets are encrypted at rest using Fernet symmetric encryption and are never exposed in API responses.Organization Secrets Vault
Store and manage secrets via the API:Bring Your Own Key (BYOK)
Use your own LLM API keys instead of Mixpeek’s default keys. This gives you:Supported Providers
Apply a Key to All LLM Operations
The fastest way to use your own key is to set it as the organization-wide default. Once configured, it automatically applies to every LLM operation — extractors, retrievers, clustering, taxonomy inference, and manifest generation — with no per-stage configuration needed.1
Store your key in the secrets vault
2
Set it as the org-wide default for that provider
Values in
default_llm_credentials are secret names (not raw API keys). The actual keys are stored encrypted in your secrets vault and resolved at runtime.Override a Key on a Specific Stage
If you need a different key for a particular retriever stage, extractor, or cluster config, setapi_key directly using the {{secrets.name}} template syntax. This overrides the org-wide default for that operation only.
Credential Resolution Order
Mixpeek resolves LLM credentials in this order (highest priority first):- Per-resource
api_key/{{secrets.name}}— explicit key on a specific stage or extractor - Organization default — set once via
default_llm_credentials, applied everywhere - Mixpeek platform keys — used when no custom key is configured (usage charged to your Mixpeek account)
Security
- Encryption at rest: All secrets are encrypted using Fernet symmetric encryption with a dedicated encryption key
- Zero exposure: Secret values are never returned in API responses — only secret names are visible
- Per-request resolution: Credentials are decrypted on-demand for each LLM call, not cached globally
- No cross-tenant leakage: Each organization’s credentials are isolated; provider instances with custom keys are never shared between organizations
- Audit trail: Secret access and organization configuration changes are logged for compliance
Security Best Practices
- Rotate credentials regularly – Update secrets via the API without changing retriever configurations
- Use IAM roles – For S3/GCS access, prefer IAM roles over long-lived access keys
- Audit access logs – Monitor secret access patterns for anomalies
- Scope API keys – Issue environment-specific Mixpeek API keys (dev, staging, prod)
Audit Trail
Every audited write records who changed what, and optionally why. Read the trail withGET /v1/organizations/audit/logs (filter by resource_id), one entry with
GET /v1/organizations/audit/logs/{audit_id}, or the whole thing as NDJSON via
GET /v1/organizations/audit/logs/export.
Everything on this page arrived in one release, so confirm it against the
host you call before depending on it. Deployments move backward as well as
forward: a rollback returns a whole release at once, so a capability that
answered yesterday can stop answering without anything failing.The cheapest check is a write. Send a change with
X-Change-Reason, read the
audit entry back, and look at reason and at the shape of changes. A
populated reason and {old, new} values mean the release is present. An
absent reason means it is not, and nothing will have told you.Record why, not just what
SendX-Change-Reason on any audited write and the reason comes back on the
audit event.
reason= passed by an endpoint
that takes one wins over the header.
On a deployment that predates this, the header is ignored rather than
rejected: the write succeeds and reason comes back empty. That is the check in
the note above, and it is the only signal you get.
X-Change-Reason is not in the OpenAPI spec. It is read request-wide
rather than declared per operation, so it appears on no endpoint’s parameter
list and the generated API reference cannot show it. This page is where it is
documented.You can still confirm it is working: the reason field on AuditEventResponse
names it, and a write sent with the header comes back with reason populated.Reading changes
changes is a JSON object, and datetime values inside it are ISO 8601 strings.
changes carries depends on the resource:
Data Protection
- Storage: rely on encryption at rest provided by MongoDB Atlas, MVS, or your infrastructure.
- Transit: require TLS for API endpoints and Ray Serve; use mTLS or network policies for cross-service traffic when available.
- Backups: configure automated backups for MongoDB and MVS; version S3 buckets with lifecycle policies.
Operational Safeguards
- Enable
/v1/healthprobes in load balancers to route around unhealthy instances. - Use webhooks to detect ingestion completion; failed webhook deliveries remain retriable in MongoDB.
- Monitor rate-limit counters and task failure rates to spot abusive or buggy clients.
- Log request IDs and namespace IDs to correlate incidents quickly.
Hardening Checklist
- Network – restrict API access to trusted origins, configure CORS, and use private networking for backend services.
- Auth – issue scoped API keys, expire unused keys, enable audit logging.
- Secrets – manage via Vault, AWS Secrets Manager, GCP Secret Manager, or Kubernetes secrets with rotation.
- Tenancy – adopt one namespace per environment/tenant; enforce
X-Namespacealways. - Monitoring – alert on health endpoint status, rate-limit breaches, or repeated 401/403 responses.

