Skip to main content
POST
/
v2
/
tasks
Create task
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

name
string
required

Task name

type
enum<string>
required

Task type

Available options:
template_evaluation,
code_evaluation
evaluators
object[]
required

Evaluators to attach (at least one required).

Minimum array length: 1
project_id
string

Project global ID (base64). Required if dataset_id is not provided. Mutually exclusive with dataset_id.

dataset_id
string

Dataset global ID (base64). Required if project_id is not provided. Mutually exclusive with project_id.

experiment_ids
string[]

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

sampling_rate
number

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

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

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

query_filter
string

Task-level query filter applied to all 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).

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 or code_evaluation

Available options:
template_evaluation,
code_evaluation
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.

experiment_ids
string[]
required

Experiment global IDs (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 global ID (base64). Present for project-based tasks.

dataset_id
string | null

The dataset global ID (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