Delete a generation
The SDKs do not wrap this method yet; call it over HTTP.
Accept deletion of one of your finished generations. Deletion is asynchronous: the response is a deletion task, which you poll with GET /deletions/{task_id} until its state is terminal. A repeat request answers with the same task while it is active, and with the most recent task once the generation is gone; after a cancelled task, a request for a generation that still exists starts a new task. See the Generation deletion guide for the full lifecycle and what a deletion removes.
Errors: 409 GENERATION.NOT_TERMINAL when your generation is still running or settling. 404 "Generation not found" when the id is not a UUID, does not exist, is not yours, or cannot be deleted, so another client's id looks the same as a missing one. 404 "Not Found" when generation deletion is not enabled for your API client.
Delete a generation
curl https://agents.lumalabs.ai/v1/generations/$GENERATION_ID \ -X DELETE \ -H "Authorization: Bearer $LUMA_AGENTS_API_KEY"{ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "blocked_reason": "fk_dependency", "completed_at": "2019-12-27T18:11:19.117Z", "delete_deadline": "2019-12-27T18:11:19.117Z", "overdue": true, "phase": "stopping", "requested_at": "2019-12-27T18:11:19.117Z", "resource_id": "resource_id", "resource_type": "generation", "scheduled_at": "2019-12-27T18:11:19.117Z", "state": "waiting", "updated_at": "2019-12-27T18:11:19.117Z"}Returns Examples
{ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "blocked_reason": "fk_dependency", "completed_at": "2019-12-27T18:11:19.117Z", "delete_deadline": "2019-12-27T18:11:19.117Z", "overdue": true, "phase": "stopping", "requested_at": "2019-12-27T18:11:19.117Z", "resource_id": "resource_id", "resource_type": "generation", "scheduled_at": "2019-12-27T18:11:19.117Z", "state": "waiting", "updated_at": "2019-12-27T18:11:19.117Z"}