Skip to content

Cancel a video job

Stop a video job that is waiting or running. A cancelled job is not charged.

Markdown
On this page
POST/v1/videos/{id}/cancel

Cancels a job and returns the job object with status: "cancelled". A job still waiting in Lykia's queue is always cancelled. A job already with the provider is cancelled only when the provider allows it at that stage. A cancelled job costs nothing.

Example

Request
curl -X POST https://api.getlykia.com/v1/videos/gen-1795463449-mbcwAk5o21bdfuKi/cancel \
  -H "Authorization: Bearer $LYKIA_API_KEY"
Response200
{
    "id": "gen-1795463449-mbcwAk5o21bdfuKi",
    "object": "video",
    "status": "cancelled",
    "progress": 0,
    "model": "bytedance/seedance-1.0-pro",
    "provider": "bytedance",
    "created_at": 1795463449,
    "completed_at": 1795463449,
    "expires_at": null,
    "duration_seconds": null,
    "params": {
        "duration": 5,
        "image": false,
        "last_frame": false,
        "reference_images": 0
    },
    "error": {
        "message": "The job was cancelled",
        "code": "cancelled",
        "reason": "invalid_request"
    },
    "usage": {
        "cost": 0,
        "is_byok": false,
        "cost_details": {
            "upstream_cost": 0,
            "platform_fee": 0,
            "is_byok": false
        }
    }
}

Errors

StatusCodeWhen
404not_foundNo such job in this project.
409job_not_cancellableThe job has already finished, or the provider cannot cancel it now.