Get or Create Default Queue
Get the default annotation queue for a project, dataset, or agent, creating one if it doesn't exist.
Get or Create Default Queue
Retrieve the default annotation queue for a given source. If no default queue exists, one is automatically created.
POST
https://api.futureagi.com/model-hub/annotation-queues/get-or-create-default/
Bearer
Click "Try It" to send a request
Authentication
| Header | Description |
|---|---|
X-Api-Key | Your API key |
X-Secret-Key | Your secret key |
Request Body
Provide exactly one of the following source identifiers:
| Field | Type | Required | Description |
|---|---|---|---|
project_id | UUID | No | Project ID to get/create a default queue for |
dataset_id | UUID | No | Dataset ID to get/create a default queue for |
agent_definition_id | UUID | No | Agent definition ID to get/create a default queue for |
Response
| Field | Type | Description |
|---|---|---|
queue | object | The default queue object |
labels | array | Labels attached to the queue |
created | boolean | true if a new queue was created, false if existing |
Code Examples
import requests
resp = requests.post(
"https://api.futureagi.com/model-hub/annotation-queues/get-or-create-default/",
headers={"X-Api-Key": "YOUR_KEY", "X-Secret-Key": "YOUR_SECRET"},
json={"project_id": "project-uuid"}
)
data = resp.json()
print(f"Queue: {data['queue']['id']}, Created: {data['created']}")import axios from 'axios';
const resp = await axios.post(
'https://api.futureagi.com/model-hub/annotation-queues/get-or-create-default/',
{ projectId: 'project-uuid' },
{ headers: { 'X-Api-Key': 'YOUR_KEY', 'X-Secret-Key': 'YOUR_SECRET' } }
);
console.log(`Queue: ${resp.data.queue.id}, Created: ${resp.data.created}`);curl -X POST "https://api.futureagi.com/model-hub/annotation-queues/get-or-create-default/" \
-H "X-Api-Key: YOUR_KEY" \
-H "X-Secret-Key: YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"project_id": "project-uuid"}' Was this page helpful?