Create Label
Create a new annotation label.
Create Label
Create a new annotation label that can be used to score traces, spans, generations, and sessions. Labels define the schema for annotation values.
POST
https://api.futureagi.com/model-hub/annotations-labels/
Bearer
Click "Try It" to send a request
Authentication
All requests require authentication via API keys:
| Header | Description |
|---|---|
X-Api-Key | Your API key |
X-Secret-Key | Your secret key |
Request Body
name string Required Display name for the label. Must be unique within your organization.
type string Required The label type. One of text, categorical, numeric, star, or thumbs_up_down. This cannot be changed after creation.
description string Optional description of what this label measures.
settings object Required Type-specific configuration. See the settings reference below.
Settings by Type
| Type | Settings | Description |
|---|---|---|
text | min_length, max_length | Minimum and maximum character length for text annotations. |
categorical | options (list of label/value), multi_choice (bool) | List of selectable options. Set multi_choice to true to allow multiple selections. |
numeric | min, max, step_size | Numeric range with step size for slider-style annotations. |
star | no_of_stars | Number of stars (e.g., 5 for a 1-5 star rating). |
thumbs_up_down | none | No additional settings required. Simple thumbs up/down toggle. |
Response
Returns the created Label object:
id string UUID of the created label.
name string Display name.
type string Label type.
description string Description, if provided.
settings object Type-specific settings.
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/annotations-labels/"
headers = {
"X-Api-Key": "YOUR_API_KEY",
"X-Secret-Key": "YOUR_SECRET_KEY",
"Content-Type": "application/json",
}
# Star rating label
payload = {
"name": "Response Quality",
"type": "star",
"description": "Rate the overall quality of the response",
"settings": {"no_of_stars": 5},
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
# Categorical label with multiple choice
payload = {
"name": "Issue Type",
"type": "categorical",
"description": "Classify the type of issue",
"settings": {
"options": [
{"label": "Accuracy", "value": "accuracy"},
{"label": "Relevance", "value": "relevance"},
{"label": "Tone", "value": "tone"},
],
"multi_choice": True,
},
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const response = await fetch(
"https://api.futureagi.com/model-hub/annotations-labels/",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"X-Secret-Key": "YOUR_SECRET_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Response Quality",
type: "star",
description: "Rate the overall quality of the response",
settings: { noOfStars: 5 },
}),
}
);
const label = await response.json();
console.log(label);curl -X POST https://api.futureagi.com/model-hub/annotations-labels/ \
-H "X-Api-Key: YOUR_API_KEY" \
-H "X-Secret-Key: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Response Quality",
"type": "star",
"description": "Rate the overall quality of the response",
"settings": {"no_of_stars": 5}
}' Was this page helpful?