Get Scores for Source

Retrieve all scores for a specific source.

Get Scores for Source

Retrieve all annotation scores attached to a specific source object. You can optionally filter by label or annotator.

GET https://api.futureagi.com/model-hub/scores/for-source/
Bearer
          Click "Try It" to send a request
        

Authentication

All requests require authentication via API keys:

HeaderDescription
X-Api-KeyYour API key
X-Secret-KeyYour secret key

Query Parameters

source_type string Required

The type of source. One of trace, span, generation, or session.

source_id string Required

UUID of the source object.

label_id string

Filter scores to only those using this label UUID.

annotator_id string

Filter scores to only those created by this annotator UUID.

Response

Returns an array of Score objects. Each object contains:

id string
UUID of the score.
source_type string
The source type.
source_id string
UUID of the source.
label_id string
UUID of the label used.
label_name string
Display name of the label.
label_type string
Type of the label.
value object
The score value.
score_source string
Origin of the score.
notes string
Attached notes, if any.
annotator string
UUID of the annotator.
annotator_name string
Display name of the annotator.
annotator_email string
Email of the annotator.
queue_item string
UUID of the associated queue item, if any.
created_at string
ISO 8601 timestamp of creation.
updated_at string
ISO 8601 timestamp of last update.

Code Examples

import requests

url = "https://api.futureagi.com/model-hub/scores/for-source/"
headers = {
    "X-Api-Key": "YOUR_API_KEY",
    "X-Secret-Key": "YOUR_SECRET_KEY",
}

params = {
    "source_type": "trace",
    "source_id": "your-source-uuid",
}

response = requests.get(url, params=params, headers=headers)
scores = response.json()

for score in scores:
    print(f"{score['label_name']}: {score['value']}")
const params = new URLSearchParams({
  sourceType: "trace",
  sourceId: "your-source-uuid",
});

const response = await fetch(
  `https://api.futureagi.com/model-hub/scores/for-source/?${params}`,
  {
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "X-Secret-Key": "YOUR_SECRET_KEY",
    },
  }
);

const scores = await response.json();
scores.forEach((score: any) => {
  console.log(`${score.labelName}: ${JSON.stringify(score.value)}`);
});
curl -G "https://api.futureagi.com/model-hub/scores/for-source/" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Secret-Key: YOUR_SECRET_KEY" \
  --data-urlencode "source_type=trace" \
  --data-urlencode "source_id=your-source-uuid"
Was this page helpful?

Questions & Discussion