Skip to main content
POST
Create fine-tuning job

Authorizations

Authorization
string
header
required

Your workspace API key, e.g. sk_sovereign_..., sent as Authorization: Bearer <key>.

Body

application/json

This body is camelCase (baseModel, trainingFileId, providerDatasetId), unlike the snake_case loop endpoints; hyperparameter keys inside are snake_case. Training data is required: pass training or the legacy trainingFileId.

baseModel
string
required

A model id from the fine-tunable catalog.

training
object

Training data source. Either {kind: "dataset", providerDatasetId, mapping, version?} or {kind: "file", fileId}.

validation
object

Optional validation source, same shape as training.

trainingFileId
string

Legacy direct file id (a provider_file_id). Prefer training.

validationFileId
string

Legacy validation file id.

name
string
Maximum string length: 300
suffix
string

A label appended to the resulting model name.

Maximum string length: 120
seed
integer

For reproducibility.

Required range: 0 <= x <= 2147483647
method
enum<string>
default:supervised

supervised = SFT/LoRA. spec-draft = a speculative-decoding drafter for a model you serve on a dedicated endpoint.

Available options:
supervised,
spec-draft
hyperparameters
object

Supervised hyperparameters. All optional; keys are snake_case inside this object. Wizard defaults: epochs 3, batch 8, lr 1e-5, ctx 8192, LoRA r/alpha 8. Out-of-bounds values fail with a named field before any money gate runs.

specDraftHyperparameters
object

Spec-draft hyperparameters (method spec-draft). Shares the common bounds; adds architecture, num_decoding_heads, loss.

integrations
array

Only wandb and hf are supported; anything else is rejected rather than forwarded with someone's credentials. Shapes: {type: "wandb", wandb: {project, api_key, name?, entity?, tags?}} and {type: "hf", hf: {output_repo_name, api_token}}.

Maximum array length: 10

Response

The created job.

id
string
provider_job_id
string

Opaque upstream job id.

name
string | null
base_model
string
method
enum<string>
Available options:
supervised,
spec-draft
status
enum<string>
Available options:
VALIDATING_FILES,
QUEUED,
RUNNING,
SUCCEEDED,
FAILED,
CANCELLED
fine_tuned_model
string | null

Output model id once the job succeeds.

deployed_model_name
string | null

The servable model name after deployment; null until deployed.

deploy_status
string | null

Deploy pipeline progress ("queued", "staging", "relaying", "converting", "provisioning", "serving", "failed"); null = never deployed. Stages evolve with the pipeline.

deploy_error
string | null

Failure reason when deploy_status is "failed".

trained_tokens
string | null

Tokens trained, as a string (drives billing).

trained_steps
integer | null
total_steps
integer | null
rate_per_m_token_usd
number

Your price per 1M trained tokens.

billed_cost_usd
number | null

Final billed training cost once the job reaches a terminal status.

error
string | null

Failure reason when status is FAILED.

created_at
string