curl --request POST \
--url https://api.tokenfactory.nebius.com/v1/operations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"query": "SELECT * FROM {src_0} WHERE condition"
},
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"type": "yql",
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"ai_project_id": "example_project"
}
'import requests
url = "https://api.tokenfactory.nebius.com/v1/operations"
payload = {
"params": { "query": "SELECT * FROM {src_0} WHERE condition" },
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"type": "yql",
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"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({
params: {query: 'SELECT * FROM {src_0} WHERE condition'},
src: {id: 'example_dataset', version: '0ed2d94b38fb40b9b61f6a01b43d53de'},
type: 'yql',
dst: {id: 'example_dataset', version: '0ed2d94b38fb40b9b61f6a01b43d53de'},
ai_project_id: 'example_project'
})
};
fetch('https://api.tokenfactory.nebius.com/v1/operations', 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/operations",
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([
'params' => [
'query' => 'SELECT * FROM {src_0} WHERE condition'
],
'src' => [
'id' => 'example_dataset',
'version' => '0ed2d94b38fb40b9b61f6a01b43d53de'
],
'type' => 'yql',
'dst' => [
'id' => 'example_dataset',
'version' => '0ed2d94b38fb40b9b61f6a01b43d53de'
],
'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/operations"
payload := strings.NewReader("{\n \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\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/operations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"ai_project_id\": \"example_project\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenfactory.nebius.com/v1/operations")
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 \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"ai_project_id\": \"example_project\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3a3fd2317bbe4b3bb9842bc1b5275eb9",
"type": "yql",
"params": {
"query": "SELECT * FROM {src_0} WHERE condition"
},
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"status": "queued",
"created_at": 1614807352,
"in_progress_at": 1614807352,
"finished_at": 1614807352,
"ai_project_id": "example_project"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Run operation
Create an operation
curl --request POST \
--url https://api.tokenfactory.nebius.com/v1/operations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"query": "SELECT * FROM {src_0} WHERE condition"
},
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"type": "yql",
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"ai_project_id": "example_project"
}
'import requests
url = "https://api.tokenfactory.nebius.com/v1/operations"
payload = {
"params": { "query": "SELECT * FROM {src_0} WHERE condition" },
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"type": "yql",
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"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({
params: {query: 'SELECT * FROM {src_0} WHERE condition'},
src: {id: 'example_dataset', version: '0ed2d94b38fb40b9b61f6a01b43d53de'},
type: 'yql',
dst: {id: 'example_dataset', version: '0ed2d94b38fb40b9b61f6a01b43d53de'},
ai_project_id: 'example_project'
})
};
fetch('https://api.tokenfactory.nebius.com/v1/operations', 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/operations",
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([
'params' => [
'query' => 'SELECT * FROM {src_0} WHERE condition'
],
'src' => [
'id' => 'example_dataset',
'version' => '0ed2d94b38fb40b9b61f6a01b43d53de'
],
'type' => 'yql',
'dst' => [
'id' => 'example_dataset',
'version' => '0ed2d94b38fb40b9b61f6a01b43d53de'
],
'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/operations"
payload := strings.NewReader("{\n \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\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/operations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"ai_project_id\": \"example_project\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenfactory.nebius.com/v1/operations")
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 \"params\": {\n \"query\": \"SELECT * FROM {src_0} WHERE condition\"\n },\n \"src\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"type\": \"yql\",\n \"dst\": {\n \"id\": \"example_dataset\",\n \"version\": \"0ed2d94b38fb40b9b61f6a01b43d53de\"\n },\n \"ai_project_id\": \"example_project\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3a3fd2317bbe4b3bb9842bc1b5275eb9",
"type": "yql",
"params": {
"query": "SELECT * FROM {src_0} WHERE condition"
},
"src": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"dst": {
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
},
"status": "queued",
"created_at": 1614807352,
"in_progress_at": 1614807352,
"finished_at": 1614807352,
"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
- CreateYQLOperationRequest
- CreateMaterializeHistoryOperationRequest
- CreateBatchInferenceOperationRequest
- CreateFineTuningOperationRequest
- CreateFileToDatasetOperationRequest
- CreateDatasetToFileOperationRequest
- CreateMergeOperationRequest
YQL query parameters.
Show child attributes
Show child attributes
{
"query": "SELECT * FROM {src_0} WHERE condition"
}
List of source datasets for the operation.
Show child attributes
Show child attributes
{
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
}
"yql"Optional destination datasets. If not provided, a temporary dataset will be created.
Show child attributes
Show child attributes
{
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
}
AI Studio project ID to associate with the dataset.
"example_project"
Response
Successful Response
Operation id
"3a3fd2317bbe4b3bb9842bc1b5275eb9"
Type of the operation.
yql, materialize_history, batch_inference, finetuning, file_to_dataset, dataset_to_file, merge "yql"
"materialize_history"
"batch_inference"
"finetuning"
"file_to_dataset"
"dataset_to_file"
"merge"
Parameters specific to the operation type.
- YQLParams
- MaterializeHistoryParams
- BatchInferenceParams
- FineTuningParams
- FileToDatasetParams
- DatasetToFileParams
- MergeParams
Show child attributes
Show child attributes
{
"query": "SELECT * FROM {src_0} WHERE condition"
}
List of source datasets for the operation.
- OperationSrcDataset
- OperationSrcTrainDataset
- OperationSrcValidationDataset
- OperationSrcDatasetToFile
Show child attributes
Show child attributes
{
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
}
List of destination datasets for the operation.
Show child attributes
Show child attributes
{
"id": "example_dataset",
"version": "0ed2d94b38fb40b9b61f6a01b43d53de"
}
Current status of the operation.
queued, running, succeeded, failed, cancelled, unknown "queued"
"running"
"succeeded"
"failed"
"cancelled"
"unknown"
The Unix timestamp (in seconds) for when the operation was created.
1614807352
The Unix timestamp (in seconds) for when the operation started processing.
1614807352
The Unix timestamp (in seconds) for when the operation was completed.
1614807352
AI Studio project ID to associate with the dataset.
"example_project"
Was this page helpful?