Quickstart
This page takes a small support-ticket router from a JSONL file to a deployed model you call with the OpenAI SDK. It uses eight training examples, which is enough to watch every step work. A fine-tune you would actually ship wants hundreds to thousands.
Plan on about half an hour. The commands return in seconds; the waiting is the training job (several minutes, longer when every GPU is busy) and the first call after you deploy, which waits for the model to load. Each step below says what to expect.
It fits inside a new account’s free allowance: 7,200 GPU-seconds (2 GPU-hours) a month, with up to 4 jobs and model calls in flight at once. See Pricing. If a step fails, Troubleshooting lists the common errors and their fixes.
1. Install
Section titled “1. Install”The turion package contains the CLI and the Python SDK. It needs Python 3.11 or newer.
uv tool install turion# or: pipx install turionturion --versionuv tool upgrade turion updates it later. The CLI runs in its own environment; to use the SDK
from your own code, add the package to that project with uv add turion (or pip install turion).
2. Log in
Section titled “2. Log in”turion login# Sign in through your browser. Check that it shows this code:## KPRT-7WQM## https://turion.ai/members/cli?code=KPRT-7WQM## opened your browser# logged in as acme (config: ~/.config/turion/config.json)# next: turion bases · docs: https://turion.ai/docs/turion login opens turion.ai in your browser. Sign in with Google if you aren’t already, check
the code matches your terminal and click Approve. The CLI gets its own API key and saves it
to ~/.config/turion/config.json. Over SSH, turion login --no-browser prints the link to open on any
device. In CI, pipe a key in instead: echo "$TURION_API_TOKEN" | turion login. Details:
Authentication & keys.
3. Get the data
Section titled “3. Get the data”Download the two example files into the directory you work in:
curl -O https://turion.ai/docs/examples/tickets.jsonlcurl -O https://turion.ai/docs/examples/evals.jsonlA training example is one JSON object per line. In the chat format it is a conversation that ends
with the answer you want the model to give. tickets.jsonl holds these eight:
{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "I was charged twice for my March invoice."}, {"role": "assistant", "content": "{\"queue\": \"billing\", \"priority\": \"high\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Can I get a copy of last year's receipts?"}, {"role": "assistant", "content": "{\"queue\": \"billing\", \"priority\": \"low\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Your API has returned 503 for the last ten minutes."}, {"role": "assistant", "content": "{\"queue\": \"outage\", \"priority\": \"high\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "The status page is a bit slow to load today."}, {"role": "assistant", "content": "{\"queue\": \"outage\", \"priority\": \"low\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Please change the email address on my account."}, {"role": "assistant", "content": "{\"queue\": \"account\", \"priority\": \"low\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "I'm locked out after enabling two-factor auth and we launch today."}, {"role": "assistant", "content": "{\"queue\": \"account\", \"priority\": \"high\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Why did my plan price go up this month?"}, {"role": "assistant", "content": "{\"queue\": \"billing\", \"priority\": \"low\"}"}]}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Every request to your API has timed out since 9:00."}, {"role": "assistant", "content": "{\"queue\": \"outage\", \"priority\": \"high\"}"}]}Eval cases use the same format. Here each case ends on the user turn and states the answer in
expected; "match": "json" compares parsed JSON, so key order and whitespace do not matter.
evals.jsonl holds three:
{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Our card was charged three times this morning."}], "expected": {"queue": "billing", "priority": "high"}, "match": "json"}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "Webhooks stopped arriving an hour ago for all our projects."}], "expected": {"queue": "outage", "priority": "high"}, "match": "json"}{"messages": [{"role": "system", "content": "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)."}, {"role": "user", "content": "How do I add a teammate to my workspace?"}], "expected": {"queue": "account", "priority": "low"}, "match": "json"}To write them by hand instead, save the two blocks above under those names. Other formats (prompt/completion, plain text, CSV, folders) and the validation rules are in Datasets. Matchers are in Evals.
4. Upload the dataset
Section titled “4. Upload the dataset”turion datasets upload tickets.jsonl# validated tickets.jsonl: chat, 8 examples, no duplicates# uploaded ds_0123456789abcdef tickets (8 examples)# ds_0123456789abcdef# train on it: turion train --base gemma-4-e4b --data ds_0123456789abcdefThe CLI parses and normalises the file before sending anything. A bad record fails here, with
its file:line. Exact duplicates are dropped and counted. The server then validates the uploaded
file again, and the dataset ends up ready (or invalid, with the reason).
You can also skip this step and pass the file to turion train --data directly; it does the same
upload first.
5. Train
Section titled “5. Train”Pick a base with turion bases (the table shows methods, minimum GPU memory and licence), then:
turion train --base gemma-4-e4b --data ds_0123456789abcdef \ --evals evals.jsonl --name tickets-v1# validated evals.jsonl: chat, 3 examples, no duplicates# uploaded ds_fedcba9876543210 evals (3 examples)# job ft_0123456789abcdef queued (base gemma-4-e4b, lora)# 8 examples · 6 optimizer steps over 3 epochs# warning: 6 optimizer steps is very little training; …# starting launching the trainer# downloading fetching the base model and the data# baseline eval scoring the base model on the eval set# training# epoch 2/3 ▕█████░░░░░▏ loss 0.412 step 3/6 eta 20s# tuned eval scoring the tuned model on the eval set# eval base 33% → tuned 100% (3 cases)# uploading saving the adapter# model acme/tickets-v1 ready — turion deploy acme/tickets-v1Expect the job to take several minutes, even with eight examples. Most of that time goes to waiting for a GPU, loading the base model, and scoring the base and the tuned model; the training steps themselves are the short part. The job above ran for nine minutes.
On a terminal, turion train draws the job live: the dataset, the GPU, a bar per epoch, then the
adapter and the eval result. It ends with one line that gives how long the job took, its id and
the next command. The lines above are what it prints when its output is piped or in a CI log. The
numbers are an example; yours will differ.
The defaults are a LoRA adapter, 3 epochs, learning rate 2e-4 and rank 16. Eight examples make
only six optimizer steps (two per epoch), hence the warning when the job starts. That is fine for this
walkthrough; a real fine-tune needs enough data for a few dozen steps or more. --name sets the model name: the result is <your handle>/tickets-v1.
turion train follows the job until it ends. Ctrl-C stops following, not training: the job
keeps running, and turion jobs get ft_… --follow picks the live view up again. --detach
returns as soon as the job is queued. Training covers methods, hyperparameters, logs and cost.
6. Read the eval
Section titled “6. Read the eval”The job scores the base model and the fine-tune on the same eval cases, at greedy decoding, with
the matcher each case names. turion jobs get shows the result and what the job cost:
turion jobs get ft_0123456789abcdef# ft_0123456789abcdef tickets-v1# status succeeded# base gemma-4-e4b (google/gemma-4-E4B-it), lora# data ds_0123456789abcdef eval ds_fedcba9876543210# params lora defaults# eval base 33% → tuned 100% (3 cases)# model acme/tickets-v1@v1 — turion deploy acme/tickets-v1# took 9m# gpu 412 gpu-seconds# fleet turion# created 2026-10-08 10:02 finished 2026-10-08 10:11The score is the pass rate: the share of cases whose answer matched. If the tuned score is not better than the base, more or cleaner data usually helps more than more epochs.
7. Deploy
Section titled “7. Deploy”turion deploy acme/tickets-v1# deployed acme/tickets-v1@v1# replicas 0-1 (scales to zero when idle)# keep-alive 300s## try it: turion chat acme/tickets-v1 "hello"# OpenAI: base_url=https://api.turion.ai/v1 model=acme/tickets-v1deploy returns at once. A deployed model scales to zero: nothing runs while it is idle, and a
replica stays warm for 300 seconds after the last call. The first call after an idle period,
including your first call now, waits for a cold start while a replica loads the base model and
your adapter. That takes from about a minute to several minutes.
turion model set acme/tickets-v1 --min-replicas 1 keeps one replica warm.
Deploy & call has the knobs. A replica is billed for the time it
is up, keep-alive included, plus the time it spent loading on a cold start; the calls it answers
add nothing on top. See Billing.
8. Chat with it
Section titled “8. Chat with it”Send the same system prompt the model was trained with:
turion chat acme/tickets-v1 \ --system "Route the ticket. Reply with JSON with keys queue (billing, outage or account) and priority (low or high)." \ "Our card was charged three times this morning."# {"queue": "billing", "priority": "high"}turion chat streams the reply. Without a prompt it opens an interactive session. If this is the
first call since you deployed, it waits for the cold start first; on a terminal it shows
waiting for acme/tickets-v1 with a timer until the first token, and a streamed call waits up to
10 minutes. Later calls answer in a second or two while the replica is warm.
9. Call it from the OpenAI SDK
Section titled “9. Call it from the OpenAI SDK”The endpoint is OpenAI-compatible. Point the official SDK at Turion and use your tk_ key:
import osfrom openai import OpenAI
SYSTEM = ( "Route the ticket. Reply with JSON with keys " "queue (billing, outage or account) and priority (low or high).")TICKET = "Our card was charged three times this morning."
client = OpenAI( base_url="https://api.turion.ai/v1", api_key=os.environ["TURION_API_TOKEN"],)reply = client.chat.completions.create( model="acme/tickets-v1", messages=[ {"role": "system", "content": SYSTEM}, {"role": "user", "content": TICKET}, ],)print(reply.choices[0].message.content)Or with curl:
curl https://api.turion.ai/v1/chat/completions \ -H "Authorization: Bearer $TURION_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"model": "acme/tickets-v1", "messages": [ {"role": "user", "content": "I was charged twice for March."} ]}'The same call from the Turion SDK, plus TypeScript, the Vercel AI SDK, LangChain and LiteLLM, is in Deploy & call.
10. Compare with a frontier model (optional)
Section titled “10. Compare with a frontier model (optional)”Store a provider key once, then score both models on the same cases:
turion providers set openaiturion eval acme/tickets-v1 --evals evals.jsonl \ --against openai/gpt-6-luna# openai/gpt-6-luna 67% (2/3)# acme/tickets-v1 100% (3/3)# openai/gpt-6-luna 67% → acme/tickets-v1 100%turion eval sends each case through the gateway at temperature 0. If your model has scaled to
zero since step 8, it sends the first case on its own and asks again while the model starts (you
see acme/tickets-v1 is still starting; asking again), then sends the rest.
It runs at most 4 cases at once, a new account’s limit, and a case that finds every place taken
(by a training job, say) waits for one to free up. Provider calls are billed by the provider, on
your key. See Evals and
Providers & traces.
Clean up
Section titled “Clean up”turion undeploy acme/tickets-v1 # calls answer 409 from now onturion datasets rm ds_0123456789abcdef # the training dataturion datasets rm ds_fedcba9876543210 # the eval setturion model archive acme/tickets-v1 v1 # optionalAfter undeploy, a replica that is still warm shuts down when its keep-alive runs out, and the
model’s billing stops there. datasets rm deletes the dataset and its file; it asks first, and
-y skips the prompt. Archiving keeps the weights but means nothing new can run on that version.
The name stays taken either way, so to go through this page again, train with another --name.
If you stored the OpenAI key only for step 10, turion providers rm openai deletes it. What else
is kept, and how to have it deleted, is in Data & security.
Learn more
Section titled “Learn more”- Datasets: formats, eval splits, limits.
- Training: bases, methods, hyperparameters, cost.
- Deploy & call: scale to zero, streaming, SDKs.
- Decision models: typed answers with probabilities instead of text, from Turion Jev 31B, TypeSafe’s Jev or a small model you train.
- Extract models: typed fields from a document, one value or
nullper field, from Turion Extract. - Agents: start an agent from the template, deploy it, and distil its traces into a fine-tune.
- Troubleshooting: what common errors mean and how to fix them.
- CLI reference, Python SDK, REST API.