modal
    Preparing search index...

    Class ModalClient

    The main client for interacting with Modal's cloud infrastructure.

    ModalClient provides access to all Modal services through service properties. Create a client instance and use its service properties to manage Apps, Functions, * Sandboxes, and other Modal resources.

    import { ModalClient } from "modal";

    const modal = new ModalClient();

    const app = await modal.apps.fromName("my-app");
    const image = modal.images.fromRegistry("python:3.13");
    const sb = await modal.sandboxes.create(app, image);
    Index

    Constructors

    Properties

    cloudBucketMounts: CloudBucketMountService
    functionCalls: FunctionCallService
    functions: FunctionService
    images: ImageService
    logger: Logger
    profile: Profile
    proxies: ProxyService
    queues: QueueService
    sandboxes: SandboxService
    secrets: SecretService
    volumes: VolumeService

    Methods

    • Parameters

      • Optionalenvironment: string

      Returns string

    • Returns the image builder version by querying the server where the local profile takes precedence.

      The image builder version is an environment-scoped server setting, so pass the environment the image will be built in (e.g. an App's environment) to fetch the correct version. When omitted, the profile's default environment is used.

      Parameters

      • OptionalenvironmentName: string

      Returns Promise<string>