Versions
Overview
The Confident AI SDK exposes every Version method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
List Versions
Lists every version of the dataset, newest first. Requires the Team plan or above.
from confident_ai import ConfidentAI
client = ConfidentAI()
dataset = client.dataset(dataset_id="<DATASET-ID>")
result = dataset.list_versions()For async mode, call a_list_versions and await it as shown below:
result = await dataset.a_list_versions(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const dataset = client.dataset("<DATASET-ID>");
const result = await dataset.listVersions();Returns
This method returns an object of type DatasetVersionList.
Create Version
Snapshots the current state of the dataset as a new immutable version. The first version takes over every unversioned golden; each later version copies every golden, tag and custom column from the previous version. Requires the Team plan or above.
from confident_ai import ConfidentAI
client = ConfidentAI()
dataset = client.dataset(dataset_id="<DATASET-ID>")
result = dataset.create_version()For async mode, call a_create_version and await it as shown below:
result = await dataset.a_create_version(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const dataset = client.dataset("<DATASET-ID>");
const result = await dataset.createVersion();Returns
This method returns an object of type CreateDatasetVersionResult.
Methods (Stateless)
These methods take every argument themselves, so a caller reaches them through client.datasets without opening a Dataset first.
Get Versions
Lists every version of the dataset, newest first. Requires the Team plan or above.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.datasets.get_versions(dataset_id="<DATASET-ID>")For async mode, call a_get_versions and await it as shown below:
result = await client.datasets.a_get_versions(...)Parameters
| Parameter | Type | Description |
|---|---|---|
dataset_id | str | Required. The unique id of the dataset. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.datasets.getVersions("<DATASET-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
datasetId | string | Required. The unique id of the dataset. |
Returns
This method returns an object of type DatasetVersionList.
Create Version
Snapshots the current state of the dataset as a new immutable version. The first version takes over every unversioned golden; each later version copies every golden, tag and custom column from the previous version. Requires the Team plan or above.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.datasets.create_version(dataset_id="<DATASET-ID>")For async mode, call a_create_version and await it as shown below:
result = await client.datasets.a_create_version(...)Parameters
| Parameter | Type | Description |
|---|---|---|
dataset_id | str | Required. The unique id of the dataset. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.datasets.createVersion("<DATASET-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
datasetId | string | Required. The unique id of the dataset. |
Returns
This method returns an object of type CreateDatasetVersionResult.
Types
CreateDatasetVersionResult
class CreateDatasetVersionResult:
id: str
version: stridstrRequired
The id of the new dataset version assigned by Confident AI, not to be confused with the version number.
Example: "<DATASET-VERSION-ID>"
versionstrRequired
The version number generated by Confident AI for the new version. It is always incremental.
Example: "00.00.02"
interface CreateDatasetVersionResult {
id: string;
version: string;
}idstringRequired
The id of the new dataset version assigned by Confident AI, not to be confused with the version number.
Example: "<DATASET-VERSION-ID>"
versionstringRequired
The version number generated by Confident AI for the new version. It is always incremental.
Example: "00.00.02"
DatasetVersion
class DatasetVersion:
id: str
version: str
created_at: str = Field(alias="createdAt")idstrRequired
The id of the dataset version assigned by Confident AI, not to be confused with the version number.
Example: "<DATASET-VERSION-ID>"
versionstrRequired
The version number of the dataset version.
Example: "00.00.01"
created_atstrRequired
When the version was created, as an ISO 8601 timestamp.
Example: "2026-05-28T13:05:24.777000+00:00"
interface DatasetVersion {
id: string;
version: string;
createdAt: string;
}idstringRequired
The id of the dataset version assigned by Confident AI, not to be confused with the version number.
Example: "<DATASET-VERSION-ID>"
versionstringRequired
The version number of the dataset version.
Example: "00.00.01"
createdAtstringRequired
When the version was created, as an ISO 8601 timestamp.
Example: "2026-05-28T13:05:24.777000+00:00"
DatasetVersionList
class DatasetVersionList:
versions: List[DatasetVersion]versionsList[DatasetVersion]Required
This is the list of versions of the dataset, newest first.
See DatasetVersion.
interface DatasetVersionList {
versions: DatasetVersion[];
}versionsDatasetVersion[]Required
This is the list of versions of the dataset, newest first.
See DatasetVersion.
Last updated on