---
title: "Bulk create dataset logs"
method: POST
path: "/api/datasets/{dataset_id}/logs/bulk/"
tags: ["datasets"]
---

# Bulk create dataset logs

`POST /api/datasets/{dataset_id}/logs/bulk/`

Submit 1 to 500 dataset logs for ingestion in one request. Each log uses the same object as the single-create endpoint, and partial success is allowed. A `201` response can therefore contain item-level errors; if every item fails, the endpoint returns `400`. Rate limit: 30 requests per minute per organization for API-key calls (shared across API keys) and per user for JWT calls.

## Path parameters

- `dataset_id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `logs` DatasetLogCreateRequest[], required — Dataset log objects to create. Items are processed independently and errors use their zero-based array index.
    - `input` union, required — Model or application input. Provide a string, structured object, or message/value array.
      - string
      - unknown[]
        - unknown
      - object
    - `output` union — Observed model or application output. Provide a string, structured object, or message/value array.
      - string
      - object
      - unknown[]
        - unknown
    - `expected_output` union — Optional ground-truth or target output used for evaluation.
      - string
      - object
      - unknown[]
        - unknown
    - `metadata` object — Additional context for this log, such as category, model, or log type.
    - `metrics` object — Numeric or structured measurements, such as token counts, cost, or latency.

## Response `201`

At least one dataset log was accepted for ingestion. Inspect `error_count` and `errors` for partial failures.

- BulkOperationResponse — Canonical result envelope for a bulk operation.
  - `success_count` integer, required — Number of items successfully processed.
  - `error_count` integer, required — Number of items that failed.
  - `errors` BulkItemError[], required — Item-level failures, keyed by zero-based input index.
    - `index` integer, required — Zero-based index of the failed item in the submitted array.
    - `error` string, required — Error message for the failed item.

## Other responses

- `400` — The request is invalid, or every submitted log failed.
- `401` — Unauthorized - Missing or invalid authentication
- `403` — Forbidden - The caller cannot add logs to this dataset
- `404` — The requested dataset does not exist.
- `422` — The request contains more than 500 logs.
- `429` — Rate limit exceeded.

## Changes

> 6 revisions in range; 3 could not be searched.

- **2026-07-31** `c26d550029f8` — 4 breaking, 5 warning, 5 info
  - the `logs/items/` request property type/format changed from `object`/`` to ``/``
  - the `errors/items/` response's property type/format changed from `object`/`` to ``/`` for status `201`
  - removed the required property `errors/items/error` from the response with the `201` status
  - removed the required property `errors/items/index` from the response with the `201` status
  - …10 more
- **2026-07-26** `77d94e49bc7a` — 2 breaking, 10 info
  - the request property `logs/items/input` became required
  - removed the required property `total_errors` from the response with the `201` status
  - added `subschema #1, subschema #2, subschema #3` to the `logs/items/expected_output` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3` to the `logs/items/input` request property `oneOf` list
  - …8 more

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/datasets/:dataset_id/logs/bulk/post.md)

---

[API](https://skmtc.dev/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.dev/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/c61efaf24756/schema)
