curl --request POST \
--url https://api.tokenfactory.nebius.com/v1/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "example_dataset",
"schema": {
"name": "text",
"type": {
"name": "string"
}
},
"folder": "/some/folder",
"rows": {
"text": "This is the first row."
},
"ai_project_id": "example_project"
}
'import requests
url = "https://api.tokenfactory.nebius.com/v1/datasets"
payload = {
"name": "example_dataset",
"schema": {
"name": "text",
"type": { "name": "string" }
},
"folder": "/some/folder",
"rows": { "text": "This is the first row." },
"ai_project_id": "example_project"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'example_dataset',
schema: {name: 'text', type: {name: 'string'}},
folder: '/some/folder',
rows: {text: 'This is the first row.'},
ai_project_id: 'example_project'
})
};
fetch('https://api.tokenfactory.nebius.com/v1/datasets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tokenfactory.nebius.com/v1/datasets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'example_dataset',
'schema' => [
'name' => 'text',
'type' => [
'name' => 'string'
]
],
'folder' => '/some/folder',
'rows' => [
'text' => 'This is the first row.'
],
'ai_project_id' => 'example_project'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tokenfactory.nebius.com/v1/datasets"
payload := strings.NewReader("{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tokenfactory.nebius.com/v1/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenfactory.nebius.com/v1/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}"
response = http.request(request)
puts response.read_body{
"id": "4d89c87498354518b92fa02fc0ad8720",
"name": "example_dataset",
"status": "READY",
"schema": {
"name": "text",
"type": {
"name": "string"
}
},
"metadata": {},
"folder": "/some/folder",
"current_version": "0ed2d94b38fb40b9b61f6a",
"created_at": 1760109124,
"error": "<string>",
"current_version_origin": {
"type": "s3"
},
"current_version_summary": {
"id": "0ed2d94b38fb40b9b61f6a",
"origin": {
"type": "s3"
},
"row_count": 100,
"size_bytes": 1024
},
"ai_project_id": "example_project"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create a dataset by uploading data
Create a dataset
curl --request POST \
--url https://api.tokenfactory.nebius.com/v1/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "example_dataset",
"schema": {
"name": "text",
"type": {
"name": "string"
}
},
"folder": "/some/folder",
"rows": {
"text": "This is the first row."
},
"ai_project_id": "example_project"
}
'import requests
url = "https://api.tokenfactory.nebius.com/v1/datasets"
payload = {
"name": "example_dataset",
"schema": {
"name": "text",
"type": { "name": "string" }
},
"folder": "/some/folder",
"rows": { "text": "This is the first row." },
"ai_project_id": "example_project"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'example_dataset',
schema: {name: 'text', type: {name: 'string'}},
folder: '/some/folder',
rows: {text: 'This is the first row.'},
ai_project_id: 'example_project'
})
};
fetch('https://api.tokenfactory.nebius.com/v1/datasets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tokenfactory.nebius.com/v1/datasets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'example_dataset',
'schema' => [
'name' => 'text',
'type' => [
'name' => 'string'
]
],
'folder' => '/some/folder',
'rows' => [
'text' => 'This is the first row.'
],
'ai_project_id' => 'example_project'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tokenfactory.nebius.com/v1/datasets"
payload := strings.NewReader("{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tokenfactory.nebius.com/v1/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenfactory.nebius.com/v1/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"example_dataset\",\n \"schema\": {\n \"name\": \"text\",\n \"type\": {\n \"name\": \"string\"\n }\n },\n \"folder\": \"/some/folder\",\n \"rows\": {\n \"text\": \"This is the first row.\"\n },\n \"ai_project_id\": \"example_project\"\n}"
response = http.request(request)
puts response.read_body{
"id": "4d89c87498354518b92fa02fc0ad8720",
"name": "example_dataset",
"status": "READY",
"schema": {
"name": "text",
"type": {
"name": "string"
}
},
"metadata": {},
"folder": "/some/folder",
"current_version": "0ed2d94b38fb40b9b61f6a",
"created_at": 1760109124,
"error": "<string>",
"current_version_origin": {
"type": "s3"
},
"current_version_summary": {
"id": "0ed2d94b38fb40b9b61f6a",
"origin": {
"type": "s3"
},
"row_count": 100,
"size_bytes": 1024
},
"ai_project_id": "example_project"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- CreateDatasetRequestUpload
- CreateDatasetRequestS3
ID of the dataset.
"example_dataset"
Dataset schema definition.
Show child attributes
Show child attributes
{
"name": "text",
"type": { "name": "string" }
}
{
"name": "text_1",
"type": {
"item": { "name": "string" },
"name": "option"
}
}
Folder path where the dataset is stored.
"/some/folder"
List of rows to be included in the dataset.
{ "text": "This is the first row." }
AI Studio project ID to associate with the dataset.
"example_project"
Response
Successful Response
The object identifier, which can be referenced in the API endpoints.
"4d89c87498354518b92fa02fc0ad8720"
ID of the dataset.
"example_dataset"
Current status of the dataset.
READY, PENDING, FAILED, TEMPORARY, DRAFT "READY"
"FAILED"
"PENDING"
Dataset schema definition.
Show child attributes
Show child attributes
{
"name": "text",
"type": { "name": "string" }
}
{
"name": "text_1",
"type": {
"item": { "name": "string" },
"name": "option"
}
}
Additional metadata associated with the dataset.
Show child attributes
Show child attributes
{}
Folder path where the dataset is stored.
"/some/folder"
Current version of the dataset.
"0ed2d94b38fb40b9b61f6a"
Unix timestamp when the dataset was created.
1760109124
Error message if the dataset is in an error state.
Origin information for the current dataset version. This object is extensible for source-specific fields.
Show child attributes
Show child attributes
{ "type": "s3" }
Summary of the current dataset version.
Show child attributes
Show child attributes
{
"id": "0ed2d94b38fb40b9b61f6a",
"origin": { "type": "s3" },
"row_count": 100,
"size_bytes": 1024
}
AI Studio project ID to associate with the dataset.
"example_project"
Was this page helpful?