Fine-tuning · not yet available
Your own decision model, trained in your region.
Train a typed decision model on your labelled examples — or on a description, with generated data — and call it on /v1/decisions like any other. The job, the data and the model stay on the region's training node. Not generally available yet.
https://cloudsitus.com /api/v1Ask for access curl https://cloudsitus.com/api/v1/fine_tuning/jobs \
-H "Authorization: Bearer cs_live_…" \
-H "X-Region: CH" \
-H "Content-Type: application/json" \
-d '{
"base_model": "laya",
"suffix": "ticket-triage",
"questions": {
"intent": { "type": "choice", "instructions": "What does the customer want?",
"criteria": { "bug": "something is broken", "billing": "invoices or pricing",
"churn": "threatening to leave" } },
"urgent": { "type": "noul", "instructions": "Does this need an answer today?" }
},
"training_data": { "format": "jsonl", "content": "{\"state\": \"…\", \"expected\": {\"intent\": \"bug\", \"urgent\": true}}\n…" }
}'
# → 201 { "id": "ftjob_ch_…", "object": "fine_tuning.job", "model": "laya",
# "status": "queued", "fine_tuned_model": null, "region": "CH",
# "preview": { "training_data": { "rows": 1200, "dropped": 3 } },
# "estimate": { "gpu_seconds": …, "synthetic_tokens": 0, "hold_micro": … } }
On this page
Availability
Switched off until enabled
503 fine_tuning_unavailable. Jobs run where a training node exists; a region without one answers 422 no_route and names the regions that have one. The job vocabulary follows OpenAI's fine-tuning API where it fits, but the request is not OpenAI's: the data is sent inline, not as a file id.RegionX-RegionThe header picks the training node; without it the request is WORLD, which has none. A model is served only in the region it was trained in.
TenancyisolationJobs and models are bound to the key's account; a reseller's end-customer key gets its own. Another account's job or model answers 404.
Endpoint
Create a job
/v1/fine_tuning/jobs201 with a preview of the rows read and an estimate.base_modelstringoptionallaya (default), laya-multilingual, deberta-v3-base or mdeberta-v3-base.
questionsobjectrequired1–32 questions keyed by id, each {type: "choice" | "score" | "noul", instructions, criteria?} — the same question types as /v1/decisions. choice and score need 2–64 options.
training_dataobjectoptional{format: "jsonl" | "csv", content, columns?}, up to 50 MB and 50,000 rows, at least 20 usable rows. JSONL rows are {state, expected} (or {text, labels}); CSV maps columns.text and columns.labels per question.
validation_dataobjectoptionalSame shape; held out for the report.
syntheticobjectoptionalInstead of (or with) data: {description, examples?, languages?} — a 20–8,000 character description, 50–20,000 generated examples (default 2,000), up to 8 languages.
hyperparametersobjectoptionalepochs 1–10, lr, head_lr, batch_size 4–64, micro_batch, grad_accum, target_error 0.01–0.5, seed. Unknown keys are rejected. The per-step batch (micro_batch for Laya, batch_size for DeBERTa) is checked against the GPU memory of the training slot before the job starts; above it the request is refused (resources_exceed_slot) — raise grad_accum for a larger effective batch instead.
limitsobjectoptional{max_gpu_minutes: 1–1440} — your GPU time budget. A budget below the job's estimate is refused up front (budget_below_estimate); a job that reaches it stops as failed / time_budget_exceeded and the time it used is billed. The response's limits states the ceiling the job runs under and the most it can cost (max_cost_micro).
suffix · keep_training_dataoptionalA lowercase suffix (up to 40 characters); keep the training rows after the job (default: they are deleted).
curl https://cloudsitus.com/api/v1/fine_tuning/jobs \
-H "Authorization: Bearer cs_live_…" \
-H "X-Region: CH" \
-H "Content-Type: application/json" \
-d '{
"base_model": "laya",
"suffix": "ticket-triage",
"questions": {
"intent": { "type": "choice", "instructions": "What does the customer want?",
"criteria": { "bug": "something is broken", "billing": "invoices or pricing",
"churn": "threatening to leave" } },
"urgent": { "type": "noul", "instructions": "Does this need an answer today?" }
},
"training_data": { "format": "jsonl", "content": "{\"state\": \"…\", \"expected\": {\"intent\": \"bug\", \"urgent\": true}}\n…" }
}'
# → 201 { "id": "ftjob_ch_…", "object": "fine_tuning.job", "model": "laya",
# "status": "queued", "fine_tuned_model": null, "region": "CH",
# "preview": { "training_data": { "rows": 1200, "dropped": 3 } },
# "estimate": { "gpu_seconds": …, "synthetic_tokens": 0, "hold_micro": … } }
One of the two
Send training_data, synthetic, or both. owner, region, account and idempotency_key are set by the gateway and refused in the body. The data, its size, the row counts, the base model's availability and the training node's capacity are all checked before any GPU is allocated: a job that cannot run is refused with the reason, never started.
Endpoint
Poll, cancel, delete
/v1/fine_tuning/jobs/{id}status (queued, running, succeeded, failed, cancelled), progress, queue_position, usage (gpu_seconds, synthetic_tokens), a report when done, and fine_tuned_model once it succeeded.GET /v1/fine_tuning/jobslistEvery job, newest first, across training nodes (unavailable_regions if one could not be read).
POST …/jobs/{id}/cancelstopStops the job and frees the GPU at once; what it used is billed.
DELETE …/jobs/{id}removeCancels if running, then deletes the job's data and model.
Endpoint
Use the model
/v1/decisionsfine_tuned_model (ft:<base>:<owner>:<job>) as model, with the same X-Region it was trained in. Single calls and {requests: […]} batches work as on the base model.curl https://cloudsitus.com/api/v1/decisions \
-H "Authorization: Bearer cs_live_…" \
-H "X-Region: CH" \
-H "Content-Type: application/json" \
-d '{
"model": "ft:laya:<owner>:<job>",
"state": "Third time this week the export died. Fix it today or we cancel.",
"questions": {
"intent": { "type": "choice", "instructions": "What does the customer want?",
"criteria": ["bug", "billing", "churn"] },
"urgent": { "type": "noul", "instructions": "Does this need an answer today?" }
}
}'
404model_not_foundAnother region, another account's model, a malformed id, or fine-tuning not enabled.
409model_not_readyThe job has not finished.
New questionsby baseA laya-based model also answers questions it was not trained on; a DeBERTa-based one only the questions it learned.
Reference
Billing
TrainingGPU secondsGPU seconds used, plus the tokens spent generating synthetic data. Billed once, when the job is first seen finished (a poll, a cancel, a delete or the hourly sweep). A failed job is billed only when the failure comes from the request — see failed jobs.
Hold402 insufficient_balanceCreating a job needs a balance covering the estimate (hold_micro).
Inferenceper input tokenCalls to an ft: model are billed per encoder input token, like the base decision model. See pricing.
Reference
Failed jobs
Oursnever billedA failure on our side — the training node, an outage, a timeout or a bug (training_failed, prepare_failed, gpu_out_of_memory, interrupted, synthetic_unavailable, wall_clock_exceeded, prepare_timeout, capacity_timeout, stuck, or any other code) — is not billed, whatever the job used. Resubmit it.
Yoursbilled as usedA failure that comes from the request is billed for the GPU time and synthetic-data tokens it consumed: invalid_training_data (the data failed validation while it was read), synthetic_rows_insufficient (the description produced too few valid rows), resources_too_small (the batch you set did not fit in GPU memory) and time_budget_exceeded (your limits.max_gpu_minutes ran out). A job you cancel is billed the same way.
erroron the jobA failed job carries error: {code, message, party: "customer" | "platform", billed, billing}, so the status says whose failure it was and whether it is billed.
Safeguardsbefore and duringThe request is checked before any GPU is allocated; transient errors reaching the training node are retried without ever starting a job twice; every job runs under a hard time ceiling, and one found past it is stopped. An interrupted run restarts from the beginning and the interrupted attempt is not billed.
Reference
Errors
503fine_tuning_unavailableNot enabled yet.
422no_routeNo training node in this X-Region.
400invalid_body · invalid_base_model · invalid_questions · invalid_requestThe message names the field.
400invalid_training_data · dataset_too_small · dataset_too_large · invalid_synthetic · invalid_limitsThe data or the request cannot train; nothing was created.
400job_too_large · budget_below_estimate · resources_exceed_slot · base_model_unavailableThe job does not fit what the region's training node can run; the message says what to change.
503capacity_unavailableThe training node is unreachable or full; nothing was created. Retry after Retry-After seconds.
404job_not_foundUnknown, deleted or not yours.
502upstream_errorThe training node failed; on create, nothing was created.