Prerequisites
- Python 3.11 or 3.12, with
uv,pipx, orpipto install the CLI. - A Freesolo API key, created in your dashboard at
freesolo.co. It’s how every
flashcommand authenticates.
Step 1: Install the CLI
Step 2: Log in
FREESOLO_API_KEY instead of passing --api-key.
Step 3: Scaffold a project
Already have a published environment id, yours or one shared with you? Set it as[environment] id in your config and skip ahead to step 5.
flash env setup leaves any file that already exists
untouched.
Already have a training loop?
Already have a training loop?
Skip the hand-editing. Point your coding agent (Claude Code, Cursor, etc.) at
the environment guide and have it find and port your
existing reward and dataset into
environment.py. A prompt to start from:Step 4: Publish your environment
An environment is the task and reward your model trains on. Publish the scaffolded one to the managed Environments Hub to get an id:your-org/starter.
Step 5: Configure and validate your run
Openconfigs/sft.toml and set the one thing that’s yours, the environment id
from the previous step:
configs/sft.toml
--dry-run parses and checks the config locally:
--cost prints the pre-flight USD cost and exits without submitting:
Step 6: Train
This is the first step that can spend money. At submit time Flash checks your
org balance against the pre-flight estimate, then bills successful runs at the
quoted Flash cost. Setup and cold start time are reported separately for
observability and are not billed.
Ctrl-C to detach. The run keeps going
on the server, and you can
follow it again any time:
done when training finishes.
Start small: finish one short run end to end before you scale up. When you do,
raise train.steps and change little else.
Step 7: Deploy
Serve the trained adapter on Freesolo’s managed serving service. Serving is billed per token for requests you send:Step 8: Chat
Essential commands
The commands you used above, plus the ones you’ll reach for next. Runflash <command> --help for the full set of flags, or see the
CLI reference.
| Command | What it does | Example |
|---|---|---|
flash login | Store your Freesolo API key locally | flash login --api-key <key> |
flash env setup | Scaffold a starter environment and configs | flash env setup |
flash env push | Publish an environment and print its id | flash env push --name starter . |
flash train | Submit a run and follow its logs | flash train configs/sft.toml |
flash train --cost | Preview the pre-flight cost, no submit | flash train configs/sft.toml --cost |
flash runs | List your runs with state, cost, and model | flash runs |
flash status | Show run status and cost | flash status <run-id> |
flash log | Print or follow worker logs | flash log <run-id> -f |
flash deploy | Serve a trained adapter | flash deploy <run-id> |
flash chat | Send a message to a deployment | flash chat <run-id> -m "hi" |
flash undeploy | Tear a deployment down | flash undeploy <run-id> |
Next steps
How Flash works
The loop behind a run, and the concepts each command refers to.
Training in depth
SFT vs GRPO, config options, monitoring, and cost.
Build an environment
Replace the starter task with your own data and reward.
Deploy & chat
Serving billing and the OpenAI-compatible API.