Skip to main content
POST
/
v2
/
tasks
curl --request POST \
  --url https://api.arize.com/v2/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "Production Hallucination Check",
  "type": "template_evaluation",
  "project_id": "TW9kZWw6MTIzOmFCY0Q=",
  "sampling_rate": 1,
  "is_continuous": true,
  "query_filter": "metadata.environment = 'production'",
  "evaluators": [
    {
      "evaluator_id": "RXZhbHVhdG9yOjEyOmFCY0Q=",
      "column_mappings": {
        "input": "attributes.input.value",
        "output": "attributes.output.value"
      }
    }
  ]
}
EOF
{
  "id": "T25saW5lVGFzazo0NTpxUndY",
  "name": "Production Hallucination Check",
  "type": "template_evaluation",
  "project_id": "TW9kZWw6MTIzOmFCY0Q=",
  "dataset_id": null,
  "sampling_rate": 1,
  "is_continuous": true,
  "query_filter": "metadata.environment = 'production'",
  "evaluators": [
    {
      "evaluator_id": "RXZhbHVhdG9yOjEyOmFCY0Q=",
      "evaluator_name": "Hallucination Eval",
      "query_filter": null,
      "column_mappings": {
        "input": "attributes.input.value",
        "output": "attributes.output.value"
      }
    }
  ],
  "experiment_ids": [],
  "last_run_at": null,
  "created_at": "2026-02-20T10:00:00.000Z",
  "updated_at": "2026-02-20T10:00:00.500Z",
  "created_by_user_id": "VXNlcjoxOm5OYkM="
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Body

application/json

Body containing task creation parameters. The type field is the discriminator.

typeSchema
template_evaluationCreateTemplateEvaluationTaskRequest
code_evaluationCreateCodeEvaluationTaskRequest
run_experimentCreateRunExperimentTaskRequest

run_experiment tasks do not run continuously — they must be triggered explicitly via POST /v2/tasks/{task_id}/trigger each time.

For template_evaluation / code_evaluation tasks, exactly one of project_id or dataset_id must be provided. When dataset_id is provided, experiment_ids must contain at least one entry. is_continuous and sampling_rate are only supported for project-based tasks.

Request body for creating a template_evaluation task. Requires evaluators and exactly one of project_id or dataset_id. When dataset_id is provided, experiment_ids must contain at least one entry.

name
string
required

Task name

Minimum string length: 1
type
enum<string>
required

Task type discriminator. Must be "template_evaluation".

Available options:
template_evaluation
evaluators
object[]
required

Evaluators to attach (at least one required).

Minimum array length: 1
project_id
string

Project identifier (base64). Required when dataset_id is not provided. Mutually exclusive with dataset_id.

dataset_id
string

Dataset identifier (base64). Required when project_id is not provided. Mutually exclusive with project_id.

experiment_ids
string[]

Experiment identifiers (base64). Required when dataset_id is provided (at least one entry). Must be omitted or empty for project-based tasks.

sampling_rate
number

Sampling rate between 0 and 1. Only supported on project-based tasks.

Required range: 0 <= x <= 1
is_continuous
boolean

Whether the task runs continuously. Only supported on project-based tasks. Must be false or omitted for dataset-based tasks.

query_filter
string

Task-level query filter applied to all evaluated data.

Response

Returns the created task

A task is a typed, configurable unit of work that ties one or more evaluators to a data source (project or dataset). run_experiment tasks additionally carry a run_configuration that defines the LLM or evaluator settings for each triggered run.

id
string
required

The unique identifier for the task

name
string
required

The name of the task

type
enum<string>
required

The task type.

  • template_evaluation - An LLM template-based evaluation task.
  • code_evaluation - A code-based evaluation task.
  • run_experiment - A task that runs experiments.
Available options:
template_evaluation,
code_evaluation,
run_experiment
is_continuous
boolean
required

Whether the task runs continuously on incoming data.

query_filter
string | null
required

Task-level query filter applied to all data.

evaluators
object[]
required

The evaluators attached to this task. Empty for run_experiment tasks.

experiment_ids
string[]
required

Experiment identifiers (base64) for dataset-based tasks.

last_run_at
string<date-time> | null
required

When the task was last run.

created_at
string<date-time>
required

When the task was created.

updated_at
string<date-time>
required

When the task was last updated.

created_by_user_id
string | null
required

The unique identifier for the user who created the task.

project_id
string | null

The project identifier (base64). Present for project-based tasks.

dataset_id
string | null

The dataset identifier (base64). Present for dataset-based tasks.

sampling_rate
number | null

Sampling rate between 0 and 1. Only applicable for project-based tasks.

Required range: 0 <= x <= 1
run_configuration
object

The run configuration for a run_experiment task. Present only when type is run_experiment. Null for all other task types.