How to cancel HTTP requests to the v0 Platform API

Hello,

I’m using the v0 Platform API. I was wondering if there is any way of cancelling the generation mid-way through.

Example: I usually send the request through cURL or Postman. By cancelling the request either by CTRL+C or clicking the cancel button on Postman I would expect that the generation stops on v0’s side. But when I go to the v0 app, I find that the generation continues to the end even if I cancelled after 1 second.

Any help is greatly appreciated here.

Thank you

Welcome to the Community, @akhalifa-4053!

I believe that what you’re experiencing is expected behavior.

Once a generation request is submitted to v0, it continues processing on the server side even if the client disconnects. This is because v0 processes generations asynchronously and the work has already been queued.

Currently, there isn’t a built-in API endpoint to explicitly cancel an in-progress generation once it’s started. The generation will complete and the result will be available in your v0 dashboard even if you cancelled the HTTP request.

If you need more control over cancelling generations or this is causing issues with your usage limits, let us know of your usecase and we can pass it onto the v0 team. :slight_smile: