MixtrainDocsBlog

List Models

mixtrain model list

List all models in the workspace.

Options:

OptionDescription
--provider, -pFilter by provider: openai, anthropic, workspace, etc.
mixtrain model list                    # Workspace models
mixtrain model list --provider openai  # OpenAI models
mixtrain model list -p workspace       # All workspace models

Download Model

mixtrain model download <name>

Download model source files to a local directory for editing.

Options:

OptionDescription
--dir, -dTarget directory (defaults to ./<name>/)
--force, -fOverwrite existing directory
# Download to default directory (./<name>/)
mixtrain model download my-model

# Download to custom directory
mixtrain model download my-model --dir ./local-copy/

# Overwrite existing directory
mixtrain model download my-model --force

Upload Model

mixtrain model upload <name> --dir <path>

Upload local model files to update the model on the platform.

Options:

OptionDescription
--dir, -dLocal directory containing model files (required)
# Upload all files from directory
mixtrain model upload my-model --dir ./local-copy/

# Typical workflow: download → edit → upload
mixtrain model download my-model
# ... edit files locally ...
mixtrain model upload my-model --dir ./my-model/

Create Model

mixtrain model create <files...>

Create a model from files. Supports directories and glob patterns.

Options:

OptionDescription
--name, -nModel name (defaults to first .py filename)
--description, -dModel description
--entrypoint, -eEntrypoint hint: file path, file:class, or class name
# Single directory (most common)
mixtrain model create ./model-dir/ --name my-model

# Multiple files
mixtrain model create model.py utils.py --name my-model

# Glob patterns
mixtrain model create "*.py" Dockerfile --name my-model

# With description
mixtrain model create model.py -n my-model -d "Image classifier"

# With --entrypoint to select a specific class from a multi-class directory:
# File only - scan only this file, must contain exactly one MixModel class
mixtrain model create . --name diffusion --entrypoint models/diffusion.py

# File:Class - select a specific class inside a file
mixtrain model create . --name diffusion --entrypoint models/diffusion.py:DiffusionModel

# Class-only - class name must be unique across all uploaded files
mixtrain model create . --name classifier --entrypoint Classifier

Entrypoint hints

The --entrypoint (or -e) option lets you create a model from a specific class when your source directory contains multiple MixModel classes. It supports three formats:

FormatExampleBehaviour
File only--entrypoint models.pyScans only that file. Must contain exactly one MixModel class.
File:Class--entrypoint models.py:DiffusionModelUses the named class in that file.
Class only--entrypoint ClassifierScans all files for a class with that name. Must be unique.

Without --entrypoint, the historic behaviour applies: all .py files are scanned, and exactly one MixModel class must exist across the entire upload.

Run Model

mixtrain model run <name> [--<input> <value> ...]

Run a model. Streams logs in real-time for native models; external models (fal, openai, etc.) return immediately.

Each argument in the model's run function is can be passed via cli flags. Scalars, enums, and resource references take a plain value; composite inputs (object, tuple, list, dict, tensor) take a JSON value. Flag names accept dashes or underscores. Run mixtrain model run <model-name> --help to see the available arguments.

Options:

OptionDescription
--<input> <value>Set a spec input by name, e.g. --prompt "A sunset". Composite types take a JSON value.
--input-json, -iAll inputs as one JSON object, or a path to a JSON file. Per-input flags override matching keys.
--detach, -dStart run and exit without streaming logs

Inputs whose name collides with a built-in flag (e.g. image, timeout) can only be set through --input-json; --help marks these.

# Per-argument flags
mixtrain model run my-model --prompt "A sunset" --steps 30

# All inputs as one JSON object or file
mixtrain model run my-model -i '{"prompt": "Hello"}' --detach
mixtrain model run my-model -i input.json

View Model

mixtrain model get <name>

View model details and recent runs.

mixtrain model get my-model

Edit Model

mixtrain model edit <name>

View and modify model files and metadata.

Options:

OptionDescription
--file, -fEdit file in $EDITOR
--view, -vView file contents
--delete, -dDelete file/folder at this path
--add, -aAdd local files to model
--name, -nRename model
--description, -DUpdate description
--yes, -ySkip confirmation prompts
mixtrain model edit my-model              # List all files
mixtrain model edit my-model -v model.py  # View file contents
mixtrain model edit my-model -f model.py  # Edit file in $EDITOR
mixtrain model edit my-model --add ./src/ # Add files
mixtrain model edit my-model -d old.py    # Delete file
mixtrain model edit my-model -n new-name  # Rename model
mixtrain model edit my-model -D "Updated" # Update description

View Logs

mixtrain model logs <name> [run_number]

View logs for a model run.

mixtrain model logs my-model       # Latest run
mixtrain model logs my-model 5     # Run #5

List Runs

mixtrain model runs <name>

List all runs for a model.

mixtrain model runs my-model

Delete Model

mixtrain model delete <name>

Delete a model.

Options:

OptionDescription
--yes, -ySkip confirmation
mixtrain model delete my-model
mixtrain model delete my-model --yes

On this page