Mixpeek is currently in private beta. To use the API, you need to register an API key and an engineer will contact you.

What is Mixpeek?

Mixpeek is an intelligence layer on top of your object store like S3. Using NLP, it grants you an “understanding” of your non-text files with just a GET /search API call.

1. Create Authentication Token

Mixpeek uses API keys to allow access to the API. You can register a Mixpeek API key using this page. Your API key acts as a tenancy to ensure you can only search the contents of your uploaded files.

Environments
productionLive environment to use with real usershttps://api.mixpeek.com

Mixpeek expects for the API key to be included in all API requests to the server within the header that looks like the following:

Authorization: API_KEY

Confirm Authorization

To confirm authorization, use this code:

curl --location --request GET 'https://api.mixpeek.com/' \
--header 'Authorization: API_KEY'

Response

If authorization is successful, you will receive this response:

{
  "credits_remaining": 1000
}

The credits_remaining number indicates how many files you’re able to upload. Every account starts with 1000 regardless of your subscription plan. Each time you upload a new file you reduce that credit count by 1. To issue more credits, sign into your account.

2. Index File

We strongly recommend you use the Mixpeek Python library available via:

Install
  pip install mixpeek

In order to make your files searchable, you must upload your files to the Mixpeek API. The engine will extract its’ contents, save the output then promptly delete the file.

Optionally, you can index your entire S3 bucket via /index-many

Request

from mixpeek import Mixpeek

mix = Mixpeek(api_key="API_KEY")

# index one local pdf document without any additional metadata

mix.index("/path/to/file/document.pdf")

# with extra metadata

mix.index(
"/path/to/file/document.pdf",
user_id="john_smith_123",
tags="document, legal",
static_file_url="cdn.host.com/document.pdf",
save=True,
description="lorem ipsum"
)

Response

  {"file_id":"63a47050660c021b5027166e"}

3. Search for Files

Once your files’ contents are extracted they will become searchable via the /search endpoint.

# simple search
mix.search(query="system")

# search with additional parameters

mix.search(
"system",
user_id="john_smith_123",
context="true",
tags="legal, document"
)

Demonstration Video

We made this helpful video before to walk you through several file type examples using Postman.