Skip to navigation

Delete an image

Deletes the image and its built image on every vendor. Running sandboxes that were created from it are not affected. The rule is the same as for DELETE /v1/sandboxes/{sandbox_id}: Meadow waits a short time for each vendor.

  • 204: every vendor image is gone.
  • 202: a vendor delete is still under way. The body is the image with status deleting. Meadow finishes the delete in the background. Poll GET /v1/images/{image_id} until it returns 404, or call delete again. A deleting image cannot start a sandbox.
  • 200: the image is deleted in Meadow and a copy may remain at a vendor. See below.

A slow or failing vendor never makes this call return 502. Before 2026-11-24 it returned 502 image deletion is still in progress; retry delete. Calling delete again while the image is deleting is safe. Once the image is gone the call returns 404.

Meadow deletes the vendor image with your current provider key for that vendor, whatever key built the image. If that key is gone, or the vendor keeps refusing, Meadow tries at most 10 times over at most 24 hours. Then it finishes the delete on its side and stops. The image then reads deleted with vendor_copies_may_remain naming the vendor, and this call and GET /v1/images/{image_id} return it with 200 from then on, so that you can remove the copy at the vendor by hand. The same happens at once when you changed the provider key and the vendor reports no such image under the new key: the image may still sit in the old vendor account.

The files of a build context that were copied to a vendor’s storage stay there. Neither vendor offers a way to remove them, so keep secrets out of build contexts.

Scope: sandboxes.

Authentication

AuthorizationBearer

A Meadow API key, sent as Authorization: Bearer mdw_.... The header x-api-key: mdw_... is accepted in its place.

Path parameters

image_idstringRequired

The image id returned by POST /v1/images.

Response headers

x-request-idstringOptional

Meadow’s id for this request, req_ and 24 hex characters. Every response carries it, including errors, streams and unknown routes. Every error in the Error schema repeats it as request_id. Quote it when you report a problem.

Response

Deleted in Meadow, and a copy may remain at a vendor. vendor_copies_may_remain names the vendors. Remove the copy there by hand.

idstring

Pass as image_id on POST /v1/sandboxes.

buildslist of objects
One entry per provider the image has been built on, or is building on.
created_atdatetime
When the image was first created.
project_idstringOptional
The project the image belongs to.
statusenumOptional
  • active: the image can be used.
  • deleting: DELETE /v1/images/{image_id} was called and a vendor image is still being removed. A deleting image cannot start a sandbox. Posting the same Dockerfile again builds a new image with a new id.
  • deleted: shown only on an image with vendor_copies_may_remain, which stays readable. Any other deleted image returns 404.
Allowed values:
vendor_copies_may_remainlist of enumsOptional

Vendors where Meadow stopped trying to delete its copy of this image, so a copy may still exist there. Absent when there are none. See DELETE /v1/images/{image_id}. An active image can carry it too: a rebuild removes the previous build’s vendor image under the same rule. Deleting such an image later returns 200, not 204, and it stays readable as deleted.

Allowed values:
namestring or nullOptional
The label given at create. Null when none was given.
sha256stringOptional
Hash of the Dockerfile text and build context. Two images with the same hash in one project are the same image.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error