Skip to main content
POST

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.

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 task. The type field is the discriminator.

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

name
string
required

Task name

Minimum string length: 1
evaluators
object[]
required

Evaluators to attach (at least one required). Evaluators use one of two mutually exclusive shapes by data granularity. Span evaluators use query_filter + per-evaluator column_mappings/query_filter. Trace/session evaluators use task-level query_filters plus per-evaluator query_mappings. Mixing the two shapes returns 400. The granularity must match the chosen shape (enforced server-side).

Minimum array length: 1

An evaluator attachment supplied when creating or updating a task. At least one entry is required on evaluation-task requests. Evaluators carry one of two mutually exclusive shapes: span evaluators use query_filter + column_mappings; trace/session evaluators use query_mappings.

type
enum<string>
required

Task type discriminator. Must be "TEMPLATE_EVALUATION".

Available options:
TEMPLATE_EVALUATION
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 (span shape). Mutually exclusive with query_filters.

query_filters
object

Named query filters plus optional expression for trace/session evaluators. Mutually exclusive with query_filter.

Response

Returns a single task object

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, evaluator, or agent settings for each triggered run.

Evaluation tasks (TEMPLATE_EVALUATION and CODE_EVALUATION) use one of two mutually exclusive query-filter shapes depending on the granularity of the data each evaluator processes:

  • Span shapequery_filter (task-level) plus per-evaluator column_mappings/query_filter. For tasks where each evaluated unit is a single span. query_filters is null.
  • Trace/session shapequery_filters (named filters plus optional expression) at the task level, and per-evaluator query_mappings. For tasks where each evaluated unit is a complete trace or session. query_filter is null.

All evaluators on a task must use the same shape; mixing shapes returns 400.

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. Span-granularity shape only. Null when the task uses the trace/session shape (query_filters). Mutually exclusive with query_filters.

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
query_filters
object | null

Named query filters plus optional boolean expression for trace/session-granularity evaluators. Null for span-granularity tasks (which use query_filter). Mutually exclusive with query_filter.

run_configuration
object

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