Skip to main content
POST
/
fine_tuning
/
jobs
curl -X POST https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "newton",
    "name": "my-tune",
    "suffix": "v2",
    "seed": 42,
    "method": {"type": "lora", "lora": {"hyperparameters": {"n_epochs": 3}}},
    "training_files": [{"type": "plain", "file_id": "fil_..."}],
    "validation_files": [{"type": "plain", "file_id": "fil_..."}]
  }'
{
  "object": "fine_tuning.job",
  "id": "your-job-id",
  "name": "my-tune",
  "model": "newton",
  "created_at": 1765201323,
  "org_id": "your-org",
  "status": "PENDING",
  "checkpoint_id": null,
  "fine_tuned_model": null,
  "finished_at": null,
  "outcome": null,
  "seed": 42,
  "user_provided_suffix": "v2",
  "training_files": ["fil_..."],
  "validation_files": ["fil_..."],
  "errors": []
}
Requires version 1.1.5 or later of the Archetype platform.

Overview

Submits a fine-tuning job for the selected model. The request body varies by model; see the request schema for the per-model methods, hyperparameters, and accepted file formats. Poll the returned job for its status, using the Get Job endpoint.

Request

Describes the new fine-tuning job. The exact shape of the input parameters depends on the model you specify.
model
string
required
The base model to fine-tune. One of newton or omega.
name
string
required
A human-readable name for the fine-tuning job. This is used to identify the job in listings and results.
suffix
string
Optional string which is appended to the name of the resulting fine-tuned model to help tell it apart from other fine-tunes.
seed
integer
Optional random seed controlling reproducibility. The same seed with the same inputs produces the same results where possible. Omit this parameter to use a random seed.
checkpoint_id
string
Optional checkpoint (ckp_...) to warm-start from; omit to train from the base model. Options can be sourced using the List Checkpoint Options endpoint.
method
object
required
The fine-tuning method to use along with its settings. The available methods depend on the selected model.
training_files
array
required
The files used to train the model.
validation_files
array
An optional array of files used to evaluate the model during training; metrics on these files help you spot overfitting. Uses the same per-model file shapes as training_files.

Response

Returns a description of the new fine-tuning job.
object
string
required
The object type. Always fine_tuning.job.
id
string
required
A unique ID for the fine-tuning job.
name
string
required
The human-readable name supplied when the job was created.
model
string
required
The base model being fine-tuned.
created_at
integer
required
The Unix timestamp (in seconds) at which the job was created.
org_id
string
required
The organization that owns the job.
status
string
required
The job’s current lifecycle stage. Mirrors the underlying Jobs Orchestraation Service job status. A job that finished processing is COMPLETED regardless of whether some inputs failed; inspect outcome for that information. One of PENDING, ADMITTED, RUNNING, COMPLETED, FAILED, PREEMPTED, CANCELLED, PAUSED, INTERRUPTED.
training_files
array
required
An array of file IDs indicating the files used to train the model.
validation_files
array
required
An array of file IDs indicating the files used to evaluate the model during training.
errors
array
required
When the job has failed, this array describes the error(s) which occurred, as the platform error envelope (a list of {code, message, suggestion, error_uid}). Empty while the job is queued/running or on success. See Error Handling for more information about handling platform errors.
checkpoint_id
string
The checkpoint the job was started from, or null if it trained from the base model.
fine_tuned_model
string
Name of the finely-tuned model produced by the job, available once training has succeeded; null until then.
finished_at
integer
The Unix timestamp (in seconds) at which the job finished, or null if it is not yet complete.
outcome
string
For a COMPLETED job, this indicates whether it succeeded fully (SUCCESS), partially (PARTIAL), or produced nothing (FAILED). This is null for any non-completed status.
seed
integer
The random seed used for the job.
user_provided_suffix
string
The suffix supplied on the request, applied to the fine-tuned model’s name.
curl -X POST https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "newton",
    "name": "my-tune",
    "suffix": "v2",
    "seed": 42,
    "method": {"type": "lora", "lora": {"hyperparameters": {"n_epochs": 3}}},
    "training_files": [{"type": "plain", "file_id": "fil_..."}],
    "validation_files": [{"type": "plain", "file_id": "fil_..."}]
  }'
{
  "object": "fine_tuning.job",
  "id": "your-job-id",
  "name": "my-tune",
  "model": "newton",
  "created_at": 1765201323,
  "org_id": "your-org",
  "status": "PENDING",
  "checkpoint_id": null,
  "fine_tuned_model": null,
  "finished_at": null,
  "outcome": null,
  "seed": 42,
  "user_provided_suffix": "v2",
  "training_files": ["fil_..."],
  "validation_files": ["fil_..."],
  "errors": []
}