Dataset Inputs
Create, explore and modify datasets

Add inputs to a dataset

cURL
1
curl --location -g --request POST 'api.clarifai.com/v2/datasets/{{dataset_id}}/inputs' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"dataset_inputs": [
6
{
7
"input": {
8
"id": "{{input_id}}"
9
}
10
}
11
]
12
}'
Copied!

List inputs in a datasets

cURL
1
curl --location -g --request GET 'api.clarifai.com/v2/datasets/{{dataset_id}}/inputs?page=1&per_page=100' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json'
Copied!

Get a dataset inputs

cURL
1
curl --location -g --request GET 'api.clarifai.com/v2/datasets/{{dataset_id}}/inputs/{{input_id}}' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json'
Copied!

Delete Inputs

cURL
1
curl --location -g --request DELETE 'api.clarifai.com/v2/datasets/{{dataset_id}}/inputs' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"input_ids": ["{{input_id}}"]
6
}'
Copied!
Last modified 1mo ago