Retrieve fine-tuning job
Get info about a fine-tuning job.
ReturnsExpand Collapse
FineTuningJob = object { id, created_at, error, 16 more } The fine_tuning.job object represents a fine-tuning job that has been created through the API.
The fine_tuning.job object represents a fine-tuning job that has been created through the API.
error: object { code, message, param } For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
hyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running supervised jobs.
The hyperparameters used for the fine-tuning job. This value will only be returned when running supervised jobs.
batch_size: optional "auto" or numberNumber of examples in each batch. A larger batch size means that model parameters
are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.
status: "validating_files" or "queued" or "running" or 3 moreThe current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.
The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.
The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
The file ID used for training. You can retrieve the training data with the Files API.
The file ID used for validation. You can retrieve the validation results with the Files API.
The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
A list of integrations to enable for this fine-tuning job.
A list of integrations to enable for this fine-tuning job.
The settings for your integration with Weights and Biases. This payload specifies the project that
metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags
to your run, and set a default entity (team, username, etc) to be associated with your run.
The settings for your integration with Weights and Biases. This payload specifies the project that metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags to your run, and set a default entity (team, username, etc) to be associated with your run.
The entity to use for the run. This allows you to set the team or username of the WandB user that you would like associated with the run. If not set, the default entity for the registered WandB API key is used.
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.
The method used for fine-tuning.
type: "supervised" or "dpo" or "reinforcement"The type of method. Is either supervised, dpo, or reinforcement.
The type of method. Is either supervised, dpo, or reinforcement.
Configuration for the DPO fine-tuning method.
Configuration for the DPO fine-tuning method.
hyperparameters: optional DpoHyperparameters { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.
The hyperparameters used for the DPO fine-tuning job.
batch_size: optional "auto" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
beta: optional "auto" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
Configuration for the reinforcement fine-tuning method.
Configuration for the reinforcement fine-tuning method.
grader: StringCheckGrader { input, name, operation, 2 more } or TextSimilarityGrader { evaluation_metric, input, name, 2 more } or PythonGrader { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.
The grader used for the fine-tuning job.
StringCheckGrader = object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
TextSimilarityGrader = object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.
A TextSimilarityGrader object which grades text based on similarity metrics.
PythonGrader = object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.
A PythonGrader object that runs a python script on the input.
ScoreModelGrader = object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.
A ScoreModelGrader object that uses a model to assign a score to the input.
input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
GraderInputs = array of string or ResponseInputText { text, type } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input
image, or input audio object.
A list of inputs, each of which may be either an input text, output text, input image, or input audio object.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.
The sampling parameters for the model.
The maximum number of tokens the grader model may generate in its response.
Constrains effort on reasoning for
reasoning models.
Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
gpt-5.1 defaults to none, which does not perform reasoning. The supported reasoning values for gpt-5.1 are none, low, medium, and high. Tool calls are supported for all reasoning values in gpt-5.1.
- All models before
gpt-5.1 default to medium reasoning effort, and do not support none.
- The
gpt-5-pro model defaults to (and only supports) high reasoning effort.
xhigh is supported for all models after gpt-5.1-codex-max.
Constrains effort on reasoning for
reasoning models.
Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
MultiGrader = object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.
A MultiGrader object combines the output of multiple graders to produce a single score.
graders: StringCheckGrader { input, name, operation, 2 more } or TextSimilarityGrader { evaluation_metric, input, name, 2 more } or PythonGrader { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
StringCheckGrader = object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
TextSimilarityGrader = object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.
A TextSimilarityGrader object which grades text based on similarity metrics.
PythonGrader = object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.
A PythonGrader object that runs a python script on the input.
ScoreModelGrader = object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.
A ScoreModelGrader object that uses a model to assign a score to the input.
input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
GraderInputs = array of string or ResponseInputText { text, type } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input
image, or input audio object.
A list of inputs, each of which may be either an input text, output text, input image, or input audio object.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.
The sampling parameters for the model.
The maximum number of tokens the grader model may generate in its response.
Constrains effort on reasoning for
reasoning models.
Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
gpt-5.1 defaults to none, which does not perform reasoning. The supported reasoning values for gpt-5.1 are none, low, medium, and high. Tool calls are supported for all reasoning values in gpt-5.1.
- All models before
gpt-5.1 default to medium reasoning effort, and do not support none.
- The
gpt-5-pro model defaults to (and only supports) high reasoning effort.
xhigh is supported for all models after gpt-5.1-codex-max.
Constrains effort on reasoning for
reasoning models.
Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
LabelModelGrader = object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item
in the evaluation.
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
input: array of object { content, role, type }
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
GraderInputs = array of string or ResponseInputText { text, type } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input
image, or input audio object.
A list of inputs, each of which may be either an input text, output text, input image, or input audio object.
InputImage = object { image_url, type, detail } An image input block used within EvalItem content arrays.
An image input block used within EvalItem content arrays.
hyperparameters: optional ReinforcementHyperparameters { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.
The hyperparameters used for the reinforcement fine-tuning job.
batch_size: optional "auto" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
compute_multiplier: optional "auto" or numberMultiplier on amount of compute used for exploring search space during training.
Multiplier on amount of compute used for exploring search space during training.
learning_rate_multiplier: optional "auto" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
Configuration for the supervised fine-tuning method.
Configuration for the supervised fine-tuning method.
hyperparameters: optional SupervisedHyperparameters { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.
The hyperparameters used for the fine-tuning job.
batch_size: optional "auto" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Retrieve fine-tuning job
curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \
-H "Authorization: Bearer $OPENAI_API_KEY"
{
"object": "fine_tuning.job",
"id": "ftjob-abc123",
"model": "davinci-002",
"created_at": 1692661014,
"finished_at": 1692661190,
"fine_tuned_model": "ft:davinci-002:my-org:custom_suffix:7q8mpxmy",
"organization_id": "org-123",
"result_files": [
"file-abc123"
],
"status": "succeeded",
"validation_file": null,
"training_file": "file-abc123",
"hyperparameters": {
"n_epochs": 4,
"batch_size": 1,
"learning_rate_multiplier": 1.0
},
"trained_tokens": 5768,
"integrations": [],
"seed": 0,
"estimated_finish": 0,
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 4,
"batch_size": 1,
"learning_rate_multiplier": 1.0
}
}
}
}
Returns Examples
{
"object": "fine_tuning.job",
"id": "ftjob-abc123",
"model": "davinci-002",
"created_at": 1692661014,
"finished_at": 1692661190,
"fine_tuned_model": "ft:davinci-002:my-org:custom_suffix:7q8mpxmy",
"organization_id": "org-123",
"result_files": [
"file-abc123"
],
"status": "succeeded",
"validation_file": null,
"training_file": "file-abc123",
"hyperparameters": {
"n_epochs": 4,
"batch_size": 1,
"learning_rate_multiplier": 1.0
},
"trained_tokens": 5768,
"integrations": [],
"seed": 0,
"estimated_finish": 0,
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 4,
"batch_size": 1,
"learning_rate_multiplier": 1.0
}
}
}
}