> ## Documentation Index
> Fetch the complete documentation index at: https://laminar.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Labeling Queues

## What is a Labeling Queue?

* A labeling queue is a collection of items that need to be labeled.
* Labeling queue is an actual queue with FIFO (first in, first out) order.
* Items in the queue have exactly the same shape as datapoints in a dataset.
* Labeling operation in this context means writing a data to the target field of a datapoint.

<div style={{ border: '1px solid #2B2B30', borderRadius: '8px', overflow: 'hidden' }}>
  <img src="https://mintcdn.com/laminarai/W6ojRY5YjRjfXRin/images/queues/lq-view.png?fit=max&auto=format&n=W6ojRY5YjRjfXRin&q=85&s=7253ba02d4df13965f44d8d90c405ffb" alt="Screenshot of a trace visualization" style={{ margin: '0px' }} width="2662" height="1564" data-path="images/queues/lq-view.png" />
</div>

## How to Use the Labeling Interface

When you open a labeling queue, you'll see a split-screen interface designed for efficient labeling:

### Payload view

The left panel shows you the full JSON payload of the current item you're labeling.
Payload is a JSON object with the same shape as a datapoint in a dataset. It has `data` and `target` fields.

### Target Editor

This is where you do the actual labeling work:

* **Edit the JSON in the target editor** to correct, improve, or write new data to the target field.
* **Use proper JSON formatting** - the editor will help you with syntax highlighting

<Tip>
  As you type in the target editor on the right, watch how the `"target"` section in the left payload updates in real-time. This helps you see exactly what will be saved to your dataset.
</Tip>

### Save Preferences

* **Select your target dataset** from the dropdown to choose where completed items should go
* **Click "Complete"** to save the current item to the dataset and move to the next item in the queue.

### Navigation

* **Check the item counter** ("Item 5 of 11") to see how many items you've completed and how many remain
* **Use the navigation buttons** to move through your queue:
  * Click **"Skip"** if you want to pass on the current item without making changes
  * Use **"Prev"** and **"Next"** to move between items (helpful for comparing similar cases)
  * Click **"Complete"** when you're satisfied with your labeling

## Push items to the queue

### From Span View

You can push individual spans directly to a labeling queue for labeling.
This is particularly useful when you want to label specific model outputs for evaluation.
Span input will be added to the `data` field of the datapoint, and span output will be added to the `target` field.

<div style={{ border: '1px solid #2B2B30', borderRadius: '8px', overflow: 'hidden' }}>
  <img src="https://mintcdn.com/laminarai/W6ojRY5YjRjfXRin/images/queues/push-from-span.png?fit=max&auto=format&n=W6ojRY5YjRjfXRin&q=85&s=747b1f2e81d45cda1c691f7dda155785" alt="Screenshot of a trace visualization" style={{ margin: '0px' }} width="1286" height="862" data-path="images/queues/push-from-span.png" />
</div>

### From Dataset View

You can also push existing datapoints from datasets into a labeling queue.
You can either push individual datapoint or select a subset of datapoints in the dataset view.

<div style={{ border: '1px solid #2B2B30', borderRadius: '8px', overflow: 'hidden' }}>
  <img src="https://mintcdn.com/laminarai/W6ojRY5YjRjfXRin/images/queues/push-from-datapoint.png?fit=max&auto=format&n=W6ojRY5YjRjfXRin&q=85&s=71673f34f20c31affe1434e51a73ed35" alt="Screenshot of a trace visualization" style={{ margin: '0px' }} width="1604" height="1306" data-path="images/queues/push-from-datapoint.png" />
</div>

### Via API

You can add items programmatically with the labeling queue items endpoint.

`POST https://api.lmnr.ai/v1/labeling_queues/<queue_id>/items`

* Auth: `Authorization: Bearer <PROJECT_API_KEY>`
* Body: `items` array with required `data` and `target` (arbitrary JSON), plus optional `metadata` (JSON object)

```bash theme={null}
export QUEUE_ID="<insert your queue_id>"
export LMNR_PROJECT_API_KEY="<insert your Laminar project API key>"
```

```bash theme={null}
curl --location "https://api.lmnr.ai/v1/labeling_queues/${QUEUE_ID}/items" \
  --header "Authorization: Bearer ${LMNR_PROJECT_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "items": [
      {
        "data": {
          "input": "What is the capital of France?",
          "context": "Geography question"
        },
        "target": "Paris",
        "metadata": {
          "model": "gpt-5.1"
        }
      }
    ]
  }'
```

<Tip>
  When pushing items to a queue, they maintain the same JSON structure as datapoints in datasets, ensuring consistency between your labeling workflow and final datasets.
</Tip>
