Import a window of request traces as dataset rows
curl --request POST \
--url https://api.veri.studio/v1/datasets/{dataset_id}/import-traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": true,
"force": true,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/datasets/{dataset_id}/import-traces"
payload = {
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": True,
"force": True,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>"
}
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({
deployment: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
model_version_id: '<string>',
limit: 1,
snapshot: true,
force: true,
scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
label: '<string>',
min_confidence: 123,
max_confidence: 123
},
thread_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/datasets/{dataset_id}/import-traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"dataset_id": "<string>",
"deployment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"format": "prompt",
"traces_scanned": 123,
"rows_appended": 123,
"skipped": "<unknown>",
"head_row": 123,
"first_row": 123,
"last_row": 123,
"snapshot_id": "<string>"
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Path Parameters
Dataset id or name
Body
Start of the trace window. Required unless thread_id is set.
End of the trace window, at most 31 days after from. Required
unless thread_id is set.
Row format to write; defaults to the dataset's locked format.
v1 accepts chat and prompt only.
prompt, preference, completion, chat, eval x >= 0Keep only traces with an ok score from evaluator matching passed /
min / max (e.g. the judge's failures). Window imports only.
Show child attributes
Show child attributes
Import one thread of deployment as one row, built from its newest
stored trace (whose messages hold the whole conversation).
from/to/limit/force/model_version_id do not apply.
Response
The locked row format of a stream. Detected from the first row and enforced on every later append (a mismatched row 400s the whole batch).
prompt, preference, completion, chat, eval Per-reason counts of traces that were fetched but not written, e.g. {"no_choices": 3, "filtered_version": 28}.
curl --request POST \
--url https://api.veri.studio/v1/datasets/{dataset_id}/import-traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": true,
"force": true,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/datasets/{dataset_id}/import-traces"
payload = {
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": True,
"force": True,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>"
}
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({
deployment: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
model_version_id: '<string>',
limit: 1,
snapshot: true,
force: true,
scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
label: '<string>',
min_confidence: 123,
max_confidence: 123
},
thread_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/datasets/{dataset_id}/import-traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"dataset_id": "<string>",
"deployment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"format": "prompt",
"traces_scanned": 123,
"rows_appended": 123,
"skipped": "<unknown>",
"head_row": 123,
"first_row": 123,
"last_row": 123,
"snapshot_id": "<string>"
}
