---
title: "recycle instance"
method: PUT
path: "/api/v0/instances/recycle/{id}/"
tags: ["Instances"]
---

# recycle instance

`PUT /api/v0/instances/recycle/{id}/`

Destroys and recreates container in place (from newly pulled image) without losing GPU priority.
Updates container status to 'recycling' and executes docker stop/remove commands on the host machine.

CLI Usage: `vastai recycle instance <id>`

## Path parameters

- `id` integer, required

## Response `200`

Instance recycle initiated successfully

- object
  - `success` boolean

## Other responses

- `400` — Bad Request - Invalid instance ID
- `401` — Unauthorized
- `429` — Too Many Requests

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
