Skip to main content
POST
/
api
/
public
/
v2
/
dataset-groups
Create Dataset Group
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/dataset-groups \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Customer support eval set",
  "folder_id": 17
}
'
{
  "success": true,
  "message": "Dataset group created successfully",
  "dataset_group": {
    "id": 123,
    "name": "Customer support eval set"
  },
  "dataset": {
    "id": 456,
    "version_number": -1
  },
  "external_ids": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a dataset group in a workspace. PromptLayer also creates an initial draft dataset for the group with version_number = -1.

Behavior Notes

  • Dataset group names must be unique within a workspace.
  • If folder_id is omitted, the dataset group is created at the workspace root.
  • Use Resolve Folder ID by Path to look up a folder ID, or Create Folder to create one.

Authorizations

X-API-KEY
string
header
required

Body

application/json

Dataset group creation payload.

name
string
required

Name for the dataset group. Must be unique within the workspace.

workspace_id
integer | null

Workspace ID. Defaults to the workspace associated with the API key.

folder_id
integer | null

Folder ID to create the dataset group in. Omit to create at the workspace root.

external_ids
ExternalId · object[]

External ID mappings to attach to the dataset group.

Response

Dataset group created.

success
enum<boolean>
required
Available options:
true
dataset_group
DatasetGroup · object
required
dataset
Dataset · object
required

Initial draft dataset created with version_number = -1.

external_ids
ExternalId · object[]
required
message
string