---
title: "Create an annotation config"
method: POST
path: "/v2/annotation-configs"
tags: ["Annotation Configs"]
---

# Create an annotation config

`POST /v2/annotation-configs`

Create a new annotation config.

**Payload Requirements**
- The annotation config name must be unique within the given space.

**Valid example**
```json
{
  "name": "my-annotation-config",
  "space_id": "spc_123",
  "annotation_config_type": "CATEGORICAL",
  "values": [
    {
      "label": "value1",
      "score": 0
    },
    {
      "label": "value2",
      "score": 1
    }
  ],
  "optimization_direction": "MAXIMIZE"
}
```

<Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>

## Request body

- union
  - object
    - `annotation_config_type` 'CONTINUOUS', required — Discriminator value identifying a continuous annotation config.
    - `name` string, required — Name of the new annotation config
    - `space_id` string, required — ID of the space the annotation config will belong to
    - `minimum_score` number, double, required — The minimum score value
    - `maximum_score` number, double, required — The maximum score value
    - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
  - object
    - `annotation_config_type` 'CATEGORICAL', required — Discriminator value identifying a categorical annotation config.
    - `name` string, required — Name of the new annotation config
    - `space_id` string, required — ID of the space the annotation config will belong to
    - `values` CategoricalAnnotationValueRequest[], required — An array of categorical annotation values
      - `label` string, required — The label value
      - `score` number, double — A score to associate with the label
    - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
  - object
    - `annotation_config_type` 'FREEFORM', required — Discriminator value identifying a freeform annotation config.
    - `name` string, required — Name of the new annotation config
    - `space_id` string, required — ID of the space the annotation config will belong to

## Response `201`

An annotation config object

- union
  - object
    - `id` string, required — The unique identifier for the annotation config
    - `name` string, required — The name of the annotation config
    - `created_at` string, date-time, required — The timestamp for when the annotation config was created
    - `space_id` string, required — The space id the annotation config belongs to
    - `type` 'CONTINUOUS', required — Discriminator value identifying a continuous annotation config.
    - `minimum_score` number, double, required — The minimum score value
    - `maximum_score` number, double, required — The maximum score value
    - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
  - object
    - `id` string, required — The unique identifier for the annotation config
    - `name` string, required — The name of the annotation config
    - `created_at` string, date-time, required — The timestamp for when the annotation config was created
    - `space_id` string, required — The space id the annotation config belongs to
    - `type` 'CATEGORICAL', required — Discriminator value identifying a categorical annotation config.
    - `values` CategoricalAnnotationValue[], required — An array of categorical annotation values
      - `label` string, required — The label value
      - `score` number, double — A score to associate with the label
    - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
  - object
    - `id` string, required — The unique identifier for the annotation config
    - `name` string, required — The name of the annotation config
    - `created_at` string, date-time, required — The timestamp for when the annotation config was created
    - `space_id` string, required — The space id the annotation config belongs to
    - `type` 'FREEFORM', required — Discriminator value identifying a freeform annotation config.

## Other responses

- `400` — Invalid request
- `401` — Authentication is required
- `403` — Insufficient permissions to access this resource
- `404` — Not found
- `409` — Resource conflict
- `422` — Unprocessable entity
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/arize-ai/apis/arize-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-rest-api/versions/2ce448f1de13/schema)
