Write a score
curl --request POST \
--url https://api.feyn.ai/v1/scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Feyn-Project: <x-feyn-project>' \
--data '
{
"traceKey": "run_123:decide",
"name": "notify",
"value": true
}
'import requests
url = "https://api.feyn.ai/v1/scores"
payload = {
"traceKey": "run_123:decide",
"name": "notify",
"value": True
}
headers = {
"X-Feyn-Project": "<x-feyn-project>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Feyn-Project': '<x-feyn-project>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({traceKey: 'run_123:decide', name: 'notify', value: true})
};
fetch('https://api.feyn.ai/v1/scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Observability
Write a score
Upsert a named value on a trace.
POST
/
v1
/
scores
Write a score
curl --request POST \
--url https://api.feyn.ai/v1/scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Feyn-Project: <x-feyn-project>' \
--data '
{
"traceKey": "run_123:decide",
"name": "notify",
"value": true
}
'import requests
url = "https://api.feyn.ai/v1/scores"
payload = {
"traceKey": "run_123:decide",
"name": "notify",
"value": True
}
headers = {
"X-Feyn-Project": "<x-feyn-project>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Feyn-Project': '<x-feyn-project>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({traceKey: 'run_123:decide', name: 'notify', value: true})
};
fetch('https://api.feyn.ai/v1/scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Body
application/json
⌘I