LOCK

Modal.com with Meridian

Run Meridian-secured workloads on Modal's serverless GPU infra. Store your license key as a Modal secret and validate inside any@stub.function.

Step 1

Store your Meridian key as a Modal secret

modal secrets create meridian-key

Paste your Meridian license key when prompted. Modal encrypts it at rest and injects it into your container at runtime.

Step 2

Validate inside your function

import os
import meridian

@stub.function(secret=modal.Secret.from_name("meridian-key"))
def secured_inference(prompt: str) -> str:
    key = os.environ["MERIDIAN_KEY"]
    meridian.validate(key)
    # ... your GPU workload

meridian.validate() throws if the key is expired, revoked, or missing. Modal cold-start latency is unaffected — validation completes in <5ms.