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

# Reserve the next item

> Returns the caller's own live reservation in this queue if they hold one, else reserves the oldest pending item (or an expired reservation) for the queue's reservation_minutes; two reviewers never hold the same item. The response carries what a reviewer needs: the item, the queue instructions, the pinned evaluator specs, and the context (trace items: request metadata, the trace body and transcript; thread items: the thread's request ids and the latest trace's transcript; experiment items: input, output, expected and transcript). 204 when nothing is left to review.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/annotation-queues/{id_or_name}/items/next
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
  - name: Metrics
    description: Prometheus metrics export for your own observability stack.
  - name: Evaluators
    description: 'Evaluators: versioned scoring rules (LLM judge, code, human).'
  - name: Experiments
    description: >-
      Experiments: offline runs of a pinned dataset snapshot through a target,
      scored by pinned evaluators.
  - name: Annotation queues
    description: >-
      Human review: queue traces, threads and experiment items, reserve one at a
      time, score them and feed corrections back into datasets.
  - name: Monitors
    description: >-
      Monitors: evaluators scoring a sampled share of a deployment's live
      traffic.
  - name: Observability
    description: Agent conversations, agents and their traffic.
  - name: Public runs
    description: Unauthenticated reads of runs their owners published to Explore.
paths:
  /v1/annotation-queues/{id_or_name}/items/next:
    post:
      tags:
        - Annotation queues
      summary: Reserve the next item
      description: >-
        Returns the caller's own live reservation in this queue if they hold
        one, else reserves the oldest pending item (or an expired reservation)
        for the queue's reservation_minutes; two reviewers never hold the same
        item. The response carries what a reviewer needs: the item, the queue
        instructions, the pinned evaluator specs, and the context (trace items:
        request metadata, the trace body and transcript; thread items: the
        thread's request ids and the latest trace's transcript; experiment
        items: input, output, expected and transcript). 204 when nothing is left
        to review.
      operationId: next
      parameters:
        - name: id_or_name
          in: path
          description: Queue id (aq_...) or name
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The reserved item and its review context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationTaskResponse'
        '204':
          description: No pending items
        '400':
          description: Evals disabled
        '404':
          description: No such queue in the caller's workspace
        '409':
          description: The queue is archived
      security:
        - bearerAuth: []
components:
  schemas:
    AnnotationTaskResponse:
      type: object
      description: A reserved item and everything needed to review it.
      required:
        - object
        - item
        - queue
        - evaluators
        - context
      properties:
        object:
          type: string
          description: Always "annotation_task".
        item:
          $ref: '#/components/schemas/AnnotationItemResponse'
        queue:
          $ref: '#/components/schemas/QueueSummary'
        evaluators:
          type: array
          items:
            $ref: '#/components/schemas/QueueEvaluator'
          description: Score each of these (POST .../complete takes one score per entry).
        context:
          $ref: '#/components/schemas/ReviewContext'
    AnnotationItemResponse:
      type: object
      required:
        - object
        - id
        - queue_id
        - target_type
        - status
        - created_at
      properties:
        object:
          type: string
          description: Always "annotation_item".
        id:
          type: string
          description: '`ai_...`'
        queue_id:
          type: string
        target_type:
          type: string
          description: trace | thread | experiment_item
        request_id:
          type:
            - string
            - 'null'
          description: 'Trace items: the request (trace id `veri-<request_id>`).'
        deployment_id:
          type:
            - string
            - 'null'
          description: Trace and thread items.
        thread_id:
          type:
            - string
            - 'null'
          description: 'Thread items: the thread and the last request under review.'
        target_revision:
          type:
            - string
            - 'null'
        experiment_id:
          type:
            - string
            - 'null'
          description: Experiment-item items.
        item_id:
          type:
            - string
            - 'null'
        status:
          type: string
          description: |-
            pending | reserved | completed | skipped. An expired reservation is
            pending.
        reserved_by:
          type:
            - string
            - 'null'
          description: 'While reserved: who holds it and until when.'
        reserved_until:
          type:
            - string
            - 'null'
          format: date-time
        completed_by:
          type:
            - string
            - 'null'
          description: Who closed the item (completed or skipped) and when.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        correction:
          description: The reviewer's corrected answer (any JSON value).
        note:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
    QueueSummary:
      type: object
      description: The queue facts a reviewer needs next to an item.
      required:
        - id
        - name
        - target_type
        - reservation_minutes
      properties:
        id:
          type: string
        name:
          type: string
        instructions:
          type:
            - string
            - 'null'
        target_type:
          type: string
        reservation_minutes:
          type: integer
          format: int32
    QueueEvaluator:
      type: object
      description: A pinned evaluator version, as a reviewer scores it.
      required:
        - evaluator_id
        - name
        - version
        - method
        - scope
        - output_type
        - output_config
      properties:
        evaluator_id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        version:
          type: integer
          format: int32
        method:
          type: string
          description: llm_judge | code | human
        scope:
          type: string
          description: single_turn | thread
        output_type:
          type: string
          description: boolean | categorical | numeric
        output_config:
          type: object
          description: >-
            boolean {pass_when}, categorical {labels, pass_labels}, numeric
            {min,

            max, pass_threshold, higher_is_better}: the values a score may take.
        instructions:
          type:
            - string
            - 'null'
          description: 'Human evaluators: the version''s reviewer instructions.'
    ReviewContext:
      type: object
      description: |-
        Everything a reviewer needs to judge one item. Trace items carry
        `request`, `trace` and `transcript`; thread items add the thread's
        `request_ids` (the trace and request are the revision's, whose messages
        hold the whole conversation); experiment items carry `experiment_item`.
      properties:
        request:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/RequestInfo'
        request_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: |-
            Thread items: the thread's request ids, oldest first, through the
            revision.
        trace:
          type:
            - object
            - 'null'
          description: |-
            The Langfuse trace, bodies included; null when unavailable (see
            trace_error).
        trace_error:
          type:
            - string
            - 'null'
          description: |-
            Why `trace` is null: traces off, the deployment records no bodies,
            retention purged it, or the trace store failed.
        transcript:
          type:
            - array
            - 'null'
          items:
            type: object
          description: |-
            The conversation as chat messages: the trace's request messages plus
            its reply, or the experiment item's transcript.
        experiment_item:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ExperimentItemInfo'
    RequestInfo:
      type: object
      description: A traced request's metadata.
      required:
        - id
        - deployment_id
        - created_at
        - status_code
        - latency_ms
        - prompt_tokens
        - completion_tokens
      properties:
        id:
          type: string
        deployment_id:
          type: string
        created_at:
          type: string
          format: date-time
        model_version_id:
          type:
            - string
            - 'null'
        thread_id:
          type:
            - string
            - 'null'
        status_code:
          type: integer
          format: int32
        latency_ms:
          type: number
          format: double
        prompt_tokens:
          type: integer
          format: int32
        completion_tokens:
          type: integer
          format: int32
        finish_reason:
          type:
            - string
            - 'null'
    ExperimentItemInfo:
      type: object
      description: An experiment item as a reviewer sees it.
      required:
        - experiment_id
        - experiment_name
        - row_id
        - trial
        - kind
        - status
      properties:
        experiment_id:
          type: string
        experiment_name:
          type: string
        row_id:
          type: integer
          format: int64
        trial:
          type: integer
          format: int32
        turn:
          type:
            - integer
            - 'null'
          format: int32
          description: The turn under review (per-turn items of a replayed thread).
        kind:
          type: string
          description: single_turn | thread
        turns:
          type:
            - integer
            - 'null'
          format: int32
        input: {}
        output: {}
        expected: {}
        metadata: {}
        transcript: {}
        status:
          type: string
          description: pending | running | done | error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.