curl --request POST \
--url https://api.arize.com/v2/alignment-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}
'import requests
url = "https://api.arize.com/v2/alignment-tasks"
payload = {
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}
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({
dataset_id: 'RGF0YXNldDoxMjM0NQ==',
name: 'Hallucination judge alignment',
judge_label_column: 'eval.hallucination.label',
annotation_column: 'annotation.hallucination.label',
alignment_function: 'EXACT_MATCH'
})
};
fetch('https://api.arize.com/v2/alignment-tasks', 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.arize.com/v2/alignment-tasks",
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([
'dataset_id' => 'RGF0YXNldDoxMjM0NQ==',
'name' => 'Hallucination judge alignment',
'judge_label_column' => 'eval.hallucination.label',
'annotation_column' => 'annotation.hallucination.label',
'alignment_function' => 'EXACT_MATCH'
]),
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.arize.com/v2/alignment-tasks"
payload := strings.NewReader("{\n \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\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.arize.com/v2/alignment-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/alignment-tasks")
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 \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\n}"
response = http.request(request)
puts response.read_body{
"id": "T25saW5lVGFzazoxMjphQmNE",
"created_at": "2026-01-04T09:12:44.218Z",
"updated_at": "2026-01-04T09:12:44.218Z",
"name": "Hallucination judge alignment",
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}{
"id": "T25saW5lVGFzazoxMjphQmNE",
"created_at": "2026-02-13T21:27:19.055Z",
"updated_at": "2026-02-13T21:27:19.055Z",
"name": "Hallucination judge alignment",
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}Create alignment task
Creates a task that compares an evaluator label column with a human annotation column on a dataset. Create an alignment run to calculate a score with this task.
Requests with the same dataset_id, judge_label_column,
annotation_column, and alignment_function return the same task,
including concurrent requests. An omitted alignment_function is
equivalent to EXACT_MATCH. The task name is not part of this key.
Returns 201 when a task is created, or 200 when an existing task is
returned. Reuse does not change the task name or timestamps.
Payload Requirements
dataset_ididentifies the dataset to compare.name,judge_label_column, andannotation_columnmust each contain 1 to 255 characters and must not contain only whitespace.judge_label_columnidentifies the evaluator labels. Useeval.<name>.labelfor labels on a dataset, oroutput.labelfor experiment output.annotation_columnidentifies the human annotations.alignment_functiondefaults toEXACT_MATCH, which compares labels for equality.- Columns are checked when a run is scored, not when a task is created. A column can be populated after task creation. A scoring failure is recorded on the run.
- Unknown fields, including
id,created_at, andupdated_at, are rejected.
Malformed IDs, incorrect field types, and a body that is not an object
return 400. Missing required values, unsupported comparison functions,
unknown fields, and values outside the length limits return 422.
A dataset that does not exist or that the caller cannot read returns
404. A dataset the caller can read but lacks permission to update
returns 403.
Valid example
{
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}
Invalid example (system-managed field supplied on input)
{
"id": "T25saW5lVGFzazoxMjphQmNE",
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label"
}
curl --request POST \
--url https://api.arize.com/v2/alignment-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}
'import requests
url = "https://api.arize.com/v2/alignment-tasks"
payload = {
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"name": "Hallucination judge alignment",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}
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({
dataset_id: 'RGF0YXNldDoxMjM0NQ==',
name: 'Hallucination judge alignment',
judge_label_column: 'eval.hallucination.label',
annotation_column: 'annotation.hallucination.label',
alignment_function: 'EXACT_MATCH'
})
};
fetch('https://api.arize.com/v2/alignment-tasks', 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.arize.com/v2/alignment-tasks",
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([
'dataset_id' => 'RGF0YXNldDoxMjM0NQ==',
'name' => 'Hallucination judge alignment',
'judge_label_column' => 'eval.hallucination.label',
'annotation_column' => 'annotation.hallucination.label',
'alignment_function' => 'EXACT_MATCH'
]),
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.arize.com/v2/alignment-tasks"
payload := strings.NewReader("{\n \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\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.arize.com/v2/alignment-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/alignment-tasks")
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 \"dataset_id\": \"RGF0YXNldDoxMjM0NQ==\",\n \"name\": \"Hallucination judge alignment\",\n \"judge_label_column\": \"eval.hallucination.label\",\n \"annotation_column\": \"annotation.hallucination.label\",\n \"alignment_function\": \"EXACT_MATCH\"\n}"
response = http.request(request)
puts response.read_body{
"id": "T25saW5lVGFzazoxMjphQmNE",
"created_at": "2026-01-04T09:12:44.218Z",
"updated_at": "2026-01-04T09:12:44.218Z",
"name": "Hallucination judge alignment",
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}{
"id": "T25saW5lVGFzazoxMjphQmNE",
"created_at": "2026-02-13T21:27:19.055Z",
"updated_at": "2026-02-13T21:27:19.055Z",
"name": "Hallucination judge alignment",
"dataset_id": "RGF0YXNldDoxMjM0NQ==",
"judge_label_column": "eval.hallucination.label",
"annotation_column": "annotation.hallucination.label",
"alignment_function": "EXACT_MATCH"
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}Authorizations
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Body
Parameters for creating an alignment task.
Parameters for creating an alignment task.
The identifier of the dataset that contains the labels and annotations
The name of the alignment task
1 - 255The dataset column holding the evaluator's labels, for example
eval.hallucination.label when the labels are already on the dataset, or
output.label when an experiment produces them.
1 - 255The dataset column holding the human annotations to compare against
1 - 255The comparison function. Defaults to EXACT_MATCH if omitted.
EXACT_MATCH Response
Returns the existing task with the same dataset, columns, and comparison function
A reusable comparison of evaluator labels and human annotations on a dataset. The dataset, label column, annotation column, and comparison function identify the task. The name does not affect task identity.
The unique identifier for the alignment task
When the alignment task was created
When the alignment task was last modified
The name of the alignment task
The identifier of the dataset that contains the labels and annotations
The dataset column holding the evaluator's labels, for example
eval.hallucination.label when the labels are already on the dataset, or
output.label when an experiment produces them.
The dataset column holding the human annotations to compare against
How an alignment task compares a judge label to a human annotation.
- EXACT_MATCH - Labels agree when their values are equal. The score is the fraction of comparable rows that agree.
EXACT_MATCH Was this page helpful?