:::callout{intent="danger"}
Cohere's fine-tuning feature was deprecated on September 15, 2025
:::

In addition to using the [Web UI](/guides/get-started-fine-tuning-fine-tuning) for fine-tuning models, customers can also kick off fine-tuning jobs programmatically using the [Fine-tuning API](https://docs.cohere.com/fern/pages/-ARCHIVE-/api-reference/finetuning-1/listfinetunedmodels.mdx) or via the [Cohere Python SDK](https://pypi.org/project/cohere/). This can be useful for fine-tuning jobs that happen on a regular cadence, such as fine-tuning nightly on newly-acquired data.

## Datasets

Before a fine-tuning job can be started, users must upload a [Dataset](https://docs.cohere.com/fern/pages/get-started/datasets.mdx) with training and (optionally) evaluation data. The contents and structure of the dataset will vary depending on the type of fine-tuning. Read more about preparing the training data for [Chat](/guides/get-started-fine-tuning-fine-tuning), [Classify](/guides/get-started-fine-tuning-fine-tuning), and [Rerank](/guides/get-started-fine-tuning-fine-tuning) fine-tuning.

The snippet below creates a dataset for fine-tuning a model on records of customer service interactions.

```python PYTHON
# create a dataset
co = cohere.Client("Your API key")

my_dataset = co.datasets.create(
    name="customer service logs",
    type="chat-finetune-input",
    data=open("./customer-chat.jsonl", "rb"),
    eval_data=open("./customer-chat-eval.jsonl", "rb"),
)

result = co.wait(my_dataset)
```

## Starting a Fine-tuning Job

Below is an example of starting a fine-tuning job of a generative model for Chat using a dataset of conversational data.

```python PYTHON
from cohere.finetuning import FinetunedModel, Settings, BaseModel

# start training a custom model using the dataset
finetuned_model = co.finetuning.create_finetuned_model(
    request=FinetunedModel(
        name="customer-service-chat-model",
        settings=Settings(
            base_model=BaseModel(
                base_type="BASE_TYPE_CHAT",
            ),
            dataset_id=my_dataset.id,
        ),
    ),
)
```

## Fine-tuning results

When the fine-tuning model is ready you will receive an email notification. You can explore the evaluation metrics using the Dashboard and try out your model using one of our APIs on the [Playground](https://dashboard.cohere.com/welcome/login?redirect_uri=%2Fplayground%2Fchat).

## Related pages

- [Changelog](../changelog.md)
- [Cohere](../index.md)
- [Cohere API](./cohere-api-index.md)
- [Cohere Labs](./cohere-labs-index.md)
- [Cohere Platform](./cohere-platform-index.md)
- [Cookbooks](./cookbooks-index.md)
- [Deployment Options](./deployment-options-index.md)
- [Embeddings (Vectors, Search, Retrieval)](./embeddings-vectors-search-retrieval-index.md)
- [Get Started](./get-started-index.md)
- [Going to Production](./going-to-production-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
