Langtrain SDK

Fine-tuning that lives in your repo.

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 langtrain
from 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)

What you can drive from code

The SDK is a thin, typed layer over the REST API — so anything you script here also works from curl if you would rather.

Launch training jobs

Create LoRA, QLoRA, full SFT and DPO runs with typed config objects instead of hand-rolled JSON payloads.

Stream metrics live

Subscribe to loss, eval and throughput events as the run progresses, so your own dashboards stay current.

Version every run

Dataset hash, seed and hyperparameters are recorded with the job, so a result stays reproducible later.

Export checkpoints

Pull weights as Safetensors, GGUF or ONNX, or push straight to a registry — the artefacts are yours.

Script the whole loop

Everything the dashboard does is an API call, so train, evaluate, promote and deploy can live in CI.

Scoped API keys

Issue keys per environment with the access each one needs, and rotate them without redeploying.

Install it and run one job.

The quick start goes from a fresh environment to a fine-tuned checkpoint without leaving your terminal.

L
Langtrain

The fine-tuning platform for production LLMs.
Built for builders who demand sovereignty.

GithubHuggingFace
All Systems Operational

Product

  • Fine-Tuning
  • PlaygroundNew
  • RL Environment
  • Guardrails
  • AI Agents
  • SDKNew
  • Model Hub
  • Pricing
  • Enterprise

Use Cases

  • Customer Support AI
  • Internal Code Assistants
  • Healthcare & HIPAA
  • Financial Services
  • Legal Document QA
  • E-Commerce & RetailNew
  • Education & EdTechNew
  • ManufacturingNew
  • Research & Data TeamsNew
  • All Use Cases

Resources

  • Documentation
  • Quick Start
  • API Reference
  • Python SDK
  • Node SDK
  • Blog
  • ComparisonsNew
  • GlossaryNew
  • Changelog
  • Status

Company

  • About Us
  • Careers
  • Contact
  • Community
  • Support

Legal

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Data Processing Agreement
© 2026 Langtrain AI Private Limited. All rights reserved.
PrivacyTermsMade with ♥ in India

LANGTRAIN