Deployment guide

Azure Functions deployment

Azure Functions integrates with the Microsoft ecosystem. SuperCompress runs as a lightweight Python function, compressing prompts before they reach Azure OpenAI.

By Arjun Shah - Creator of SuperCompress - Updated 2026-07-03

Azure Function handler

import azure.functions as func
from supercompress import Compressor
comp = Compressor()

def main(req: func.HttpRequest) -> func.HttpResponse:
    body = req.get_json()
    result = comp.compress(body["context"], body["query"])
    return func.HttpResponse(
        json.dumps({"compressed_text": result.compressed_text}),
        mimetype="application/json"
    )

Frequently asked questions

Does it work with Azure OpenAI?

Yes. Use compressed text as input to Azure OpenAI's chat completions.

What pricing plan is recommended?

Consumption plan for low volume, Premium plan for production workloads.

Build with less context

Put compression in front of your next LLM call.

Use the hosted API or run SuperCompress locally. Keep the evidence, drop the token waste, and measure the savings before it reaches your model.

Get an API keyRead the guide