Skip to content
Get started

Publish a dataset to an external platform

client.datasets.publish(stringdatasetID, DatasetPublishParams { target, target_spec } body, RequestOptionsoptions?): DatasetPublishResponse { publish_id, status, message }
POST/api/v1/datasets/{dataset_id}/publish

Publishes the processed dataset to Hugging Face or Kaggle. Currently returns 501 — not yet implemented.

ParametersExpand Collapse
datasetID: string
body: DatasetPublishParams { target, target_spec }
target: "huggingface" | "kaggle"

Destination platform for publishing the dataset

One of the following:
"huggingface"
"kaggle"
target_spec?: Record<string, unknown>

Target-specific configuration (e.g. repo name for HuggingFace, slug for Kaggle)

ReturnsExpand Collapse
DatasetPublishResponse { publish_id, status, message }
publish_id: string

Unique identifier for the publish job

status: string

Status of the publish job

message?: string

Additional information about the publish request

Publish a dataset to an external platform

import Adaption from 'adaption';

const client = new Adaption({
  apiKey: process.env['ADAPTION_API_KEY'], // This is the default and can be omitted
});

const response = await client.datasets.publish('dataset_id', { target: 'huggingface' });

console.log(response.publish_id);
{
  "publish_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "message": "message"
}
Returns Examples
{
  "publish_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "message": "message"
}