Docs/Start here

Deploy your first model

Define the infrastructure, initialize your model, and expose a handler in one source file.

Before you start

Install the native infimal CLI, and install the Python SDK (Python 3.11 or later, `pip install infimal`) in the environment that has your model code: the CLI runs your module through the SDK to plan and deploy it. You also need your own model loading and inference code, and an API key for a provisioned Infimal environment.

Terminal / reference
curl -fsSL https://infimal.ai/install.sh | sh
python -m pip install infimal
infimal login --key
infimal apps plan --help

Create asr-emotion-checkpoint4200.py

Save this file in your model project. Replace my_model with your own module. Its load_model function must return an object that can handle the audio payload. Keep reusable model initialization inside setup.

Python
from infimal import App, Endpoint, Scale, Batch app = App(    "asr-emotion-checkpoint4200",    endpoint=Endpoint(public=False),    scale=Scale(min_replicas=0, max_replicas=1000),    batch=Batch(max_size=16, window_ms=20),) @app.setupdef load():    from my_model import load_model    return load_model() @app.handlerdef transcribe(model, request):    return model(request["audio"])

Review the plan

Run from the directory containing asr-emotion-checkpoint4200.py. The CLI imports the module, validates the App, and compares the declaration with the configured environment. Review the plan before changing infrastructure. Module imports must be safe to run during planning.

Terminal / reference
infimal apps plan asr-emotion-checkpoint4200

Build and deploy

Deploy runs the build and placement flow for the application. The builder initializes the model and publishes a snapshot. Inspect status and build logs to confirm the outcome; a submitted command is not proof of a healthy service.

Terminal / reference
infimal apps deploy asr-emotion-checkpoint4200
infimal apps status asr-emotion-checkpoint4200
infimal apps logs asr-emotion-checkpoint4200 --limit 50

Change the definition

Change access, batching, or scale bounds in your source. Plan again, then apply. The CLI distinguishes changes that need a new build from those that can update the running configuration.

Terminal / reference
infimal apps plan asr-emotion-checkpoint4200
infimal apps apply asr-emotion-checkpoint4200