Path parameters
-
Format should match the following pattern:
^gen-
.
POST /generations/{id}/cancel
curl \
-X POST https://v5.jinshuju.net/exam/api/generations/{id}/cancel
Response examples (200)
{
"id": "gen-6757a420e88e5d8d2a0bbd23",
"object": "generation",
"status": "cancelled",
"created_at": "2024-12-10T10:14:56.622+08:00",
"finished_at": null
}
Response examples (400)
{
"error": {
"type": "invalid_request_error",
"message": "Generation is already finished"
}
}
Response examples (404)
{
"error": {
"type": "invalid_request_error",
"message": "No such Generation object: gen-123"
}
}