> For the complete documentation index, see [llms.txt](https://docs.annolab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.annolab.ai/annotations-and-relations/annotation-layers.md).

# Annotation Layers

## Create Annotation Layer

<mark style="color:green;">`POST`</mark> `https://api.annolab.ai/v1/layer/create`

Create a new annotation layer for your project&#x20;

#### Headers

| Name          | Type   | Description                                                                                                                                                             |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization | string | <p>Where you put your api key. Creating a project requires a key with "Write" permissions.<br><br><code>{"Authorization": "Api-key XXXXXXX-XXXXXXX-XXXXXXX"}</code></p> |

#### Request Body

| Name              | Type    | Description                                                                                                                                                            |
| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| layerName         | string  | Name of the layer that will be created                                                                                                                                 |
| projectIdentifier | string  | Identifier of the project containing the layer. Either the id or the unique name.                                                                                      |
| isGold            | boolean | boolean for whether the layer being created is a "Gold Set" i.e. a layer with data that will be considered truth when compared against annotation or experiment layers |
| description       | string  | Name of the project you wish to create. Must be unique for your group                                                                                                  |

{% tabs %}
{% tab title="201 Project was successfully created" %}

```
{
    "projectName": "New NER Project",
    "projectId": 1,
    "layerName": "NER Gold",
    "id": 5,
    "isGold": true,
    "description": 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}
```

{% endtab %}

{% tab title="400 Project creation failed" %}

```
{
    "message": "Information about why creation failed"
}
```

{% endtab %}
{% endtabs %}

Examples of how to make a layer create request

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

```python
import requests

ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

layer = {
  'projectIdentifier': 'New NER Project',
  'layerName': 'NER Gold'
  'isGold': True,
  'description': 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}

headers = {
  'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}

url = 'https://api.annolab.ai/v1/layer/create'

response = requests.post(url, headers=headers, json=layer)

print(response.json())
```

{% endtab %}
{% endtabs %}


---

# 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.annolab.ai/annotations-and-relations/annotation-layers.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.
