Get Next Item

Retrieve the next available item for the current user to annotate.

Get Next Item

Get the next pending or in-progress item assigned to the current user. Uses the queue’s assignment strategy to determine which item to return.

GET https://api.futureagi.com/model-hub/annotation-queues/{queue_id}/items/next-item/
Bearer
          Click "Try It" to send a request
        

Authentication

HeaderDescription
X-Api-KeyYour API key
X-Secret-KeyYour secret key

Path Parameters

ParameterTypeRequiredDescription
queue_idUUIDYesThe annotation queue ID

Response

Returns the next queue item object with source data, or 404 if no items are available.

Note

Items already in progress by the current user are returned first. If none exist, a new pending item is assigned based on the queue’s assignment strategy.

Code Examples

import requests

queue_id = "your-queue-uuid"
resp = requests.get(
    f"https://api.futureagi.com/model-hub/annotation-queues/{queue_id}/items/next-item/",
    headers={"X-Api-Key": "YOUR_KEY", "X-Secret-Key": "YOUR_SECRET"}
)
if resp.status_code == 200:
    print(resp.json())
else:
    print("No items available")
import axios from 'axios';

const queueId = 'your-queue-uuid';
try {
  const resp = await axios.get(
    `https://api.futureagi.com/model-hub/annotation-queues/${queueId}/items/next-item/`,
    { headers: { 'X-Api-Key': 'YOUR_KEY', 'X-Secret-Key': 'YOUR_SECRET' } }
  );
  console.log(resp.data);
} catch (e) {
  if (e.response?.status === 404) console.log('No items available');
}
curl "https://api.futureagi.com/model-hub/annotation-queues/your-queue-uuid/items/next-item/" \
  -H "X-Api-Key: YOUR_KEY" \
  -H "X-Secret-Key: YOUR_SECRET"
Was this page helpful?

Questions & Discussion