Skip to main content
POST
/
api
/
{projectId}
/
split
Split dataset
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/split \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "trainingSplitRatio": 123,
  "testingSplitRatio": 123,
  "validationSplitRatio": 123,
  "excludeDisabledSamples": false,
  "stratifyBy": {
    "label": true,
    "metadataKeys": [
      "<string>"
    ]
  },
  "keepTogetherMetadataKeys": [
    "<string>"
  ]
}
'
{
  "success": true,
  "error": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

Body

application/json
trainingSplitRatio
number
required

Proportion of the dataset to use for training.

testingSplitRatio
number
required

Proportion of the dataset to use for testing.

validationSplitRatio
number

Proportion of the dataset to use for validation. This is experimental and may change in the future.

excludeDisabledSamples
boolean
default:false

Whether to exclude samples that are marked as disabled.

stratifyBy
object

Optional balancing targets for the split.

keepTogetherMetadataKeys
string[]

List of metadata keys whose matching values must stay together in a single split. This is useful for leakage prevention across train, validation, and test.

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

error
string

Optional error description (set if 'success' was false)