Skip to content

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
POST/v1/fine_tuning/jobs
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

Until fine-tuning is enabled, every endpoint answers 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-Region

The 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.

Tenancyisolation

Jobs 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

POST/v1/fine_tuning/jobs
Validates the data, places a hold for the estimate, and queues the job. Returns 201 with a preview of the rows read and an estimate.
base_modelstringoptional

laya (default), laya-multilingual, deberta-v3-base or mdeberta-v3-base.

questionsobjectrequired

1–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_dataobjectoptional

Same shape; held out for the report.

syntheticobjectoptional

Instead 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.

hyperparametersobjectoptional

epochs 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_dataoptional

A lowercase suffix (up to 40 characters); keep the training rows after the job (default: they are deleted).

POST/v1/fine_tuning/jobs
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

GET/v1/fine_tuning/jobs/{id}
The job: 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/jobslist

Every job, newest first, across training nodes (unavailable_regions if one could not be read).

POST …/jobs/{id}/cancelstop

Stops the job and frees the GPU at once; what it used is billed.

DELETE …/jobs/{id}remove

Cancels if running, then deletes the job's data and model.

Endpoint

Use the model

POST/v1/decisions
Pass fine_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.
POST/v1/decisions
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_found

Another region, another account's model, a malformed id, or fine-tuning not enabled.

409model_not_ready

The job has not finished.

New questionsby base

A laya-based model also answers questions it was not trained on; a DeBERTa-based one only the questions it learned.

Reference

Billing

TrainingGPU seconds

GPU 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_balance

Creating a job needs a balance covering the estimate (hold_micro).

Inferenceper input token

Calls to an ft: model are billed per encoder input token, like the base decision model. See pricing.

Reference

Failed jobs

Oursnever billed

A 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 used

A 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 job

A 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 during

The 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_unavailable

Not enabled yet.

422no_route

No training node in this X-Region.

400invalid_body · invalid_base_model · invalid_questions · invalid_request

The message names the field.

400invalid_training_data · dataset_too_small · dataset_too_large · invalid_synthetic · invalid_limits

The data or the request cannot train; nothing was created.

400job_too_large · budget_below_estimate · resources_exceed_slot · base_model_unavailable

The job does not fit what the region's training node can run; the message says what to change.

503capacity_unavailable

The training node is unreachable or full; nothing was created. Retry after Retry-After seconds.

404job_not_found

Unknown, deleted or not yours.

502upstream_error

The training node failed; on create, nothing was created.