Python and TypeScript clients over the same API the dashboard uses.
Nothing here is dashboard-only. Launch a run, stream its metrics, gate promotion on an eval and deploy the winner — all from code you can put under version control and run in CI.
$ pip install langtrainfrom langtrain import LangtrainClient
client = LangtrainClient(api_key="lt_...")
job = client.finetune.create(
base_model="meta-llama/Llama-3.2-8B-Instruct",
dataset_id="ds_abc123",
method="lora",
config={
"epochs": 3,
"learning_rate": 2e-4,
"lora_rank": 16,
},
)
for event in client.finetune.stream(job.id):
print(event.step, event.loss)
model = client.finetune.wait(job.id)
print(model.checkpoint_uri)The SDK is a thin, typed layer over the REST API — so anything you script here also works from curl if you would rather.
Create LoRA, QLoRA, full SFT and DPO runs with typed config objects instead of hand-rolled JSON payloads.
Subscribe to loss, eval and throughput events as the run progresses, so your own dashboards stay current.
Dataset hash, seed and hyperparameters are recorded with the job, so a result stays reproducible later.
Pull weights as Safetensors, GGUF or ONNX, or push straight to a registry — the artefacts are yours.
Everything the dashboard does is an API call, so train, evaluate, promote and deploy can live in CI.
Issue keys per environment with the access each one needs, and rotate them without redeploying.