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.

Try it yourself

Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.

Open the Playground Embed the badge