apicheats.dev Cheat sheet Raw .md
POST

Try POST /fine_tuning/jobs — OpenAI API

OpenAI playground

Create fine-tuning job

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.openai.com; the proxy stores and logs nothing about them.

Body application/json

9 body fields
  • model · required · string — The name of the model to fine-tune. You can select one of the [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods).
  • training_file · required · string — The ID of an uploaded file that contains training data. See [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. The contents of the file should differ depending on if the model uses the [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details.
  • hyperparameters · optional · object — The hyperparameters used for the fine-tuning job. This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.
  • suffix · optional · string — A string of up to 64 characters that will be added to your fine-tuned model name. For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
  • validation_file · optional · string — The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files. Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details.
  • integrations · optional · object[] — A list of integrations to enable for your fine-tuning job.
  • seed · optional · integer — The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.
  • method · optional · object — The method used for fine-tuning.
  • metadata · optional · object — 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.