Generations
Cancel a generation
Stops a queued or running generation and releases its hold; if the provider finishes it anyway, the result is thrown away and nothing is charged. A generation that already ended comes back as it is. Two kinds can't be stopped once started and answer 409: a run at a provider that bills it either way, and a preset run that has already shown its preview. Each runs to its end and is charged only if it succeeds.
Needs an API key with the generations:write scope.
post/v1/generations/{id}/cancel
Request
- Base URL: https://api.tryleap.ai
- URL: https://api.tryleap.ai/v1/generations/{id}/cancel
- Auth: one of:
- API key in header x-api-key
- HTTP bearer
Path parameters
idstring required
The generation's ID, gen_....
Response
The generation, canceled, or as it was if it had already ended.
Changes
No recorded changes to this operation across all 1 revision of this API.