Delete a generation
Delete one generation result, exactly as deleting it in the app does.
On this page
Deletes one generation result, by the id from
List generations. It behaves exactly like deleting
the image in the app.
https://api2.rundiffusion.com/api/v2/library/{item_id}Who can delete a generation
Your own results, always. On a team, a holder of
Can manage everyone's generations and boards (MANAGE_ALL_GENERATIONS) can
also delete other members' results on that team, and only there: the permission
never reaches across teams. Anything else answers 404, never 403, so an id
cannot be probed for whether it exists.
Request
Headers
AuthorizationstringRequired- Bearer token. This endpoint accepts an OAuth device flow token, a Personal API Access Token, or a Company API Access Token. See Authentication.
Authorization: Bearer eyJhbGciOi…
Path parameters
item_idstringRequired- The item id from the listing: run_id and result_id joined by a colon. The first half is a 20-character id, the second a dashed UUID.
Rn8qWm…:0b6a1f6e-93cf-…
curl -X DELETE https://api2.rundiffusion.com/api/v2/library/$ITEM_ID \
-H "Authorization: Bearer $RUNDIFFUSION_TOKEN"await fetch(
`https://api2.rundiffusion.com/api/v2/library/${itemId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.RUNDIFFUSION_TOKEN}` },
},
);requests.delete(
f"{BASE}/library/{item_id}",
headers=HEADERS,
)Response
204 No Content. Deleting is acknowledged at the source of record; the listing
and Get a generation read a synced view, so a
just-deleted item can linger there for a short moment before it disappears.
Deleting a result does not touch the tool that produced it, the board it ran on, or the upload it was made from.
Errors
Status codes
401TOKEN_INVALID- Missing or invalid credential.
404LIBRARY_ITEM_NOT_FOUND- No such item, not one this credential may delete, or already deleted. All three read the same on purpose.
429RATE_LIMITED- Too many requests. Deletes have a tighter budget than reads. See Rate limits.
