Skip to main content

SDK Examples

These examples show runnable SDK workflows.

Available Examples​

ExampleWhat it shows
Pod lifecycle with Lium()Create a pod, wait for readiness, run commands, transfer files, and clean up.
Train a model on a podSync a training project, stream the training run, download a checkpoint, and stop the pod.
Custom Docker templateCreate a private template with a Docker image, startup command, ports, environment, and volume paths.
Remote inference with @lium.machineOffload a Python function to a GPU pod and run a small instruct model.
Run a vLLM serverCreate a vLLM template, start a GPU pod, and expose the OpenAI-compatible API.

Use the SDK reference when you need exact signatures, return types, and model fields.