API Referenceeval-setsBulk Create Evaluation Set Items

POST POST /evaluation-sets/{eval_set_id}/items:bulk

Headers: x-api-key, Content-Type: application/json
Body:

{
  "items": [
    { "file_id": "file_123", "ground_truth": { "invoice_total": 582.33 } },
    { "file_id": "file_456", "ground_truth": { "invoice_total": 912.00 } }
  ]
}

cURL

curl -X POST https://api.algorythmos.fr/evaluation-sets/es_92F/items:bulk \
 -H "x-api-key: $ALG_KEY" \
 -H "Content-Type: application/json" \
 -d '{"items":[{"file_id":"file_123","ground_truth":{"invoice_total":582.33}},{"file_id":"file_456","ground_truth":{"invoice_total":912.00}}]}'

JavaScript

await fetch('https://api.algorythmos.fr/evaluation-sets/es_92F/items:bulk', {
  method: 'POST',
  headers: { 'x-api-key': process.env.ALG_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    items: [
      { file_id: 'file_123', ground_truth: { invoice_total: 582.33 } },
      { file_id: 'file_456', ground_truth: { invoice_total: 912.0 } }
    ]
  })
})

Python

import requests, os
requests.post(
  'https://api.algorythmos.fr/evaluation-sets/es_92F/items:bulk',
  headers={'x-api-key': os.environ['ALG_KEY']},
  json={'items': [
    {'file_id': 'file_123', 'ground_truth': {'invoice_total': 582.33}},
    {'file_id': 'file_456', 'ground_truth': {'invoice_total': 912.00}}
  ]}
)