Appearance
API and agents
Everything you do in the dashboard to train a model you can also do from your own code or let an AI agent do for you: get a price, upload your training data, start a job, follow it and download the fine-tuned model. The API reference (OpenAPI) is at docs.alallo.com/openapi.json.
API keys
An API key lets a program act as you. Make one in the dashboard: Profile > API keys > Make key. Give it a name, choose what it allows and set its monthly cap.
- Prices and data checks (scope
quote): list models, get prices, upload and check training files, read jobs, logs and downloads. - Start jobs (scope
jobs): all of the above, plus start and cancel jobs.
The key is shown once, when you make it. Keep it like a password. If you lose it, revoke it in Profile and make a new one; a revoked key stops working within a minute.
A key acts as the person who made it. If that person leaves your alallo account, their keys stop working. Account owners see and can revoke every key on the account; team members see their own.
Send the key in the Authorization header:
Authorization: Bearer alk_...Spending cap and credit
Every key has a monthly cap in your account's currency (EUR on alallo.com, USD on us.alallo.com). When a key starts a job, the job's quoted price (for Fastest finish, the top of its price range) counts against the cap for the calendar month. A start that would go over the cap is refused with status 402 and a message saying how much is left. When a job ends and costs less than was counted (for example, it was cancelled before training started), the difference is counted back.
Jobs started with a key are paid from your account's credit, like any other job. A key can't add credit: only a person can top up, in the dashboard. If the credit is too low, the API answers 402 with the link to the top-up page, so an agent can pass it to you. Keys also can't manage users or other keys.
A price without an account
POST /v1/public/estimate gives an approximate price and time range without signing up or uploading anything. Tell it the model, the method and the size of your data, either in tokens or as a number of examples and their average length in characters:
bash
curl -s https://alallo.com/v1/public/estimate \
-H 'Content-Type: application/json' \
-d '{"model": "Qwen/Qwen3-0.6B", "algorithm": "sft-lora", "examples": 1000, "avg_chars": 800, "epochs": 1}'The answer has the same price fields as a signed-in estimate (price, currency, minimum, per_m, eta_hours, and price_max for Fastest finish) and says "estimate": "approximate until your data is checked". The fixed price for your job comes from POST /v1/estimate once your file is uploaded.
The full loop with curl
Set your key and the site once:
bash
export ALALLO_API_KEY=alk_...
export ALALLO=https://alallo.com # US accounts: https://us.alallo.com
H="Authorization: Bearer $ALALLO_API_KEY"- Upload your training file. Ask for an upload address, send the file there, then ask alallo to check it:
bash
SIZE=$(wc -c < train.jsonl | tr -d ' ')
UP=$(curl -s -X POST $ALALLO/v1/datasets/upload-url -H "$H" -H 'Content-Type: application/json' \
-d "{\"filename\": \"train.jsonl\", \"size\": $SIZE}")
DATASET=$(echo "$UP" | jq -r .id)
curl -s -X PUT "$(echo "$UP" | jq -r .url)" --upload-file train.jsonl
curl -s -X POST $ALALLO/v1/datasets/$DATASET/check -H "$H"The check answers with the file's rows, columns and a sample; status 202 means a large file is still being checked, so ask again after a few seconds.
- Get the fixed price:
bash
SPEC="{\"name\": \"my first model\", \"model\": \"Qwen/Qwen3-0.6B\",
\"dataset\": {\"uploaded\": \"$DATASET\"},
\"training\": {\"algorithm\": \"sft-lora\", \"params\": {\"max_steps\": 100}}}"
curl -s -X POST $ALALLO/v1/estimate -H "$H" -H 'Content-Type: application/json' -d "{\"spec\": $SPEC}"Status 202 means alallo is still reading your data to price it exactly; ask again shortly. A file in a column format other than OpenAI or Alpaca needs a text template in the dataset, for example "text_template": "{question}\n{answer}"; see Data formats.
- Start the job. The start is billed, so it needs
"confirm": true:
bash
JOB=$(curl -s -X POST $ALALLO/v1/jobs -H "$H" -H 'Content-Type: application/json' \
-d "{\"spec\": $SPEC, \"confirm\": true}" | jq -r .id)- Follow it, read the training log and download the model when it has succeeded:
bash
curl -s $ALALLO/v1/jobs/$JOB -H "$H" | jq '{status, progress, price, eta_hours}'
curl -s "$ALALLO/v1/jobs/$JOB/logs?tail=50" -H "$H"
curl -s $ALALLO/v1/jobs/$JOB/output -H "$H" | jq '.files[] | {name, url}, .kept_until'The download links are valid for a short while; ask for new ones when they run out. alallo keeps the model for 30 days after the job finishes; see Job outputs.
To cancel: curl -s -X POST $ALALLO/v1/jobs/$JOB/cancel -H "$H". See Cancelling jobs and refunds for what a cancel costs.
The same in Python
python
import os, time, requests
BASE = os.environ.get("ALALLO_API_URL", "https://alallo.com")
S = requests.Session()
S.headers["Authorization"] = f"Bearer {os.environ['ALALLO_API_KEY']}"
def ask(method, path, **kw):
"""Repeat while alallo answers 202 (still checking or pricing your data)."""
while True:
r = S.request(method, BASE + path, **kw)
if r.status_code != 202:
r.raise_for_status()
return r.json()
time.sleep(5)
path = "train.jsonl"
up = ask("POST", "/v1/datasets/upload-url",
json={"filename": "train.jsonl", "size": os.path.getsize(path)})
with open(path, "rb") as f:
requests.put(up["url"], data=f).raise_for_status()
print(ask("POST", f"/v1/datasets/{up['id']}/check"))
spec = {"name": "my first model", "model": "Qwen/Qwen3-0.6B",
"dataset": {"uploaded": up["id"]},
"training": {"algorithm": "sft-lora", "params": {"max_steps": 100}}}
quote = ask("POST", "/v1/estimate", json={"spec": spec})
print("price", quote["price"], quote["currency"])
job = ask("POST", "/v1/jobs", json={"spec": spec, "confirm": True})
while (job := ask("GET", f"/v1/jobs/{job['id']}"))["status"] not in ("succeeded", "failed", "cancelled"):
time.sleep(60)
print(ask("GET", f"/v1/jobs/{job['id']}/output"))Using alallo from an AI agent (MCP)
The alallo-mcp package is a Model Context Protocol server: it lets an agent such as Claude Code, Cursor or Codex use alallo with your API key. Its tools list models, get quotes, upload and check data, start jobs (only with an explicit confirmation and after showing the price), follow and cancel them, get download links and show your credit.
With Claude Code:
bash
claude mcp add alallo -e ALALLO_API_KEY=alk_... -- npx -y alallo-mcpFor Cursor, Codex and other agents, see the package's README. US accounts set ALALLO_API_URL=https://us.alallo.com.
Limits
- An account can have up to 25 keys.
- Small files can also be sent in the request body to
POST /v1/datasets?filename=...(up to 10 MB); use the upload address for anything larger (up to 2 GB). - The public estimate is limited to a few requests a second.