---
title: "Re-queues failed items of a sample generation so they run again."
method: POST
path: "/benchmark/sample-generation/{sampleGenerationId}/retry"
tags: ["SampleGeneration"]
---

# Re-queues failed items of a sample generation so they run again.

`POST /benchmark/sample-generation/{sampleGenerationId}/retry`

When no item ids are supplied, every failed item of the generation qualifies. Item ids that
 do not belong to the generation or are not in a failed state are ignored. Returns the ids
 that were re-queued; a generation with no failed items yields an empty result.
 When no failure categories are supplied, the retry covers only the items whose failure a
 re-run can plausibly fix, so items rejected for the request itself — an unknown model,
 refused credentials, a content-policy or configuration rejection — are left alone rather than
 re-run to collect the same rejection. Naming those categories explicitly retries them anyway;
 combining categories with item ids intersects the two.

## Path parameters

- `sampleGenerationId` string, required

## Request body

- object, nullable
  - `itemIds` string[], nullable — The specific item ids to retry. When omitted or empty, every failed item of the generation qualifies.
  - `failureCategories` SampleGenerationItemFailureCategory[], nullable — The failure categories to retry. When omitted or empty, only the categories a re-run can plausibly fix qualify. Combined with item ids the two intersect.

## Response `200`

OK

- RetrySampleGenerationEndpointOutput
  - `retriedCount` integer, required — How many failed items were re-queued.
  - `retriedItemIds` string[], required — The ids of the items that were re-queued.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

## Changes

- **2026-09-04** `9da534659e5f` — 1 info
  - the security scope `api` was added to the endpoint's security scheme `OpenIdConnect`
- **2026-08-27** `4ee3e6f5e4f4` — 1 info
  - added the new optional request property `oneOf[#/components/schemas/RetrySampleGenerationEndpoint_Input]/failureCategories`

[Change history](https://skmtc.dev/rapidata/apis/rapidata-api/changes/benchmark/sample-generation/:sampleGenerationId/retry/post.md)

---

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