> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/set_tasks_as_benchmark.md).

# set\_tasks\_as\_benchmark

`imerit_ango.sdk.SDK.`

## set\_tasks\_as\_benchmark(project\_id, task\_ids, is\_benchmark)

Marks or unmarks one or more existing project tasks as benchmarks.

{% hint style="info" %}
The API key must belong to a project lead or project manager for the project.
{% endhint %}

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) function.
* **task\_ids:** List\[string]
  * The unique identifiers of the tasks to mark or unmark. You can find task IDs in [the user interface](/sdk/sdk-documentation.md#task-and-asset-ids) or retrieve them using the [`get_tasks`](/sdk/sdk-documentation/project-level-sdk-functions/get_tasks.md) function.
  * All tasks must belong to the project identified by `project_id`.
* **is\_benchmark:** bool, *Optional, default True*
  * Set to `True` to mark the tasks as benchmarks.
  * Set to `False` to remove their benchmark status.

{% hint style="info" %}
To include the marked tasks in benchmark allocation, enable benchmarking for the project. For information about how benchmark tasks work and which annotation types are supported, see [Benchmarks](/core-concepts/benchmarks.md).
{% endhint %}

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Includes a `status` field indicating whether the request was successful and a `data` field containing the updated benchmark status, the number of tasks changed, and their task IDs.

<details open>

<summary><strong>How to verify in Ango Hub?</strong></summary>

After successfully executing the `set_tasks_as_benchmark` function, navigate to **Projects → \[Your Project] → Tasks**.

* Tasks marked as benchmarks display a yellow crown in the task list.
* Tasks that have been unmarked no longer display the crown.

{% hint style="info" %}
Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.
{% endhint %}

</details>

### Example

Mark tasks as benchmarks:

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

response = ango_sdk.set_tasks_as_benchmark(
    project_id=project_id,
    task_ids=["<TASK ID 1>", "<TASK ID 2>"]
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID/benchmark-tasks" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "tasks": ["<TASK ID 1>", "<TASK ID 2>"],
    "isBenchmark": true
  }'
```

{% endtab %}
{% endtabs %}

Remove benchmark status from tasks:

```python
response = ango_sdk.set_tasks_as_benchmark(
    project_id=project_id,
    task_ids=["<TASK ID 1>", "<TASK ID 2>"],
    is_benchmark=False
)
```

{% hint style="info" %}
**See also**

[update\_benchmark\_settings](/sdk/sdk-documentation/project-level-sdk-functions/update_benchmark_settings.md), [get\_tasks](/sdk/sdk-documentation/project-level-sdk-functions/get_tasks.md), [Benchmarks](/core-concepts/benchmarks.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/set_tasks_as_benchmark.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
