> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reap.video/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Project

> Cancel a project that is still processing and refund its credits

> **For AI agents:** a documentation index is at [/llms.txt](/llms.txt). Every page is also available as markdown, just append `.md` to the URL.

## Overview

Cancel a project that is still processing. On cancel, the project moves to a `cancelled` status and its credits are **refunded automatically** — there's no separate call to make. A cancelled project stays in your workspace and remains fully readable, but it can no longer be edited, published, or scheduled.

## Rate Limiting

This endpoint is rate limited to 10 requests per minute per API key.

## When a project can be cancelled

You can cancel a project only while it's still **processing**, in either of these cases:

* **Just after you start it** — while Reap is still preparing your video, before any clips or outputs have been generated.
* **If it looks stuck** — it's been processing for more than \~8 hours without finishing.

Once a project has finished (`completed` or `failed`) — or has already been cancelled — it can't be cancelled again, and the API responds with `400`.

<Note>
  Cancelling refunds the project's credits automatically. There's no separate call to make, and credits are refunded only once.
</Note>

## After cancelling

A cancelled project stays in your workspace and remains fully readable, but it's locked for edits.

**Still available**

* View or list the project and its clips — [Get Project Details](/api-reference/get-project-details), [Get Project Status](/api-reference/get-project-status), [Get All Projects](/api-reference/get-all-projects), [Get Project Clips](/api-reference/get-project-clips)
* [Delete the project](/api-reference/delete-project)

**No longer available** (these return `400`)

* Rename the project — [Update Project](/api-reference/update-project)
* Edit a clip — [Update Clip](/api-reference/update-clip)
* Publish a clip — [Publish Clip](/api-reference/publish-clip)
* Update a post — [Update Post](/api-reference/update-post)
* Schedule clips — in [Schedule Clips](/api-reference/schedule-clips), a cancelled project's clips come back in the `failed` array instead of failing the whole request.

## Response

<ResponseField name="id" type="string">
  Unique project identifier
</ResponseField>

<ResponseField name="title" type="string">
  Project title
</ResponseField>

<ResponseField name="thumbnail" type="string">
  Thumbnail URL for the project
</ResponseField>

<ResponseField name="billedDuration" type="number">
  Duration in seconds that was billed for this project
</ResponseField>

<ResponseField name="status" type="string">
  Current processing status. After a successful cancel, this is `cancelled`.
</ResponseField>

<ResponseField name="projectType" type="string">
  Type of project
</ResponseField>

<ResponseField name="source" type="string">
  Source of the video content
</ResponseField>

<ResponseField name="genre" type="string">
  Video genre used for AI analysis
</ResponseField>

<ResponseField name="topics" type="array">
  Array of identified topics in the video
</ResponseField>

<ResponseField name="clipDurations" type="array">
  Array of clip duration preferences
</ResponseField>

<ResponseField name="selectedStart" type="number">
  Start time in seconds for processing (null if entire video)
</ResponseField>

<ResponseField name="selectedEnd" type="number">
  End time in seconds for processing (null if entire video)
</ResponseField>

<ResponseField name="reframeClips" type="boolean">
  Whether clips are automatically reframed
</ResponseField>

<ResponseField name="exportResolution" type="integer">
  Output resolution for the project
</ResponseField>

<ResponseField name="exportOrientation" type="string">
  Output orientation
</ResponseField>

<ResponseField name="captionsPreset" type="string">
  Caption style preset ID (null if captions disabled)
</ResponseField>

<ResponseField name="enableCaptions" type="boolean">
  Whether captions are enabled
</ResponseField>

<ResponseField name="enableEmojis" type="boolean">
  Whether emojis are added to captions
</ResponseField>

<ResponseField name="enableHighlights" type="boolean">
  Whether keyword highlighting is enabled
</ResponseField>

<ResponseField name="language" type="string">
  Primary language of the video content
</ResponseField>

<ResponseField name="dubbingLanguage" type="string">
  Target dubbing language (null if not applicable)
</ResponseField>

<ResponseField name="translateTranscription" type="boolean">
  Whether transcription is translated
</ResponseField>

<ResponseField name="translationLanguages" type="array">
  Array of languages for translation
</ResponseField>

<ResponseField name="transcriptionScript" type="string">
  Script format for transcription ("native" or "roman")
</ResponseField>

<ResponseField name="metadata" type="object">
  Video file metadata including duration, resolution, format, etc.
</ResponseField>

<ResponseField name="urls" type="object">
  Project URLs and assets
</ResponseField>

<ResponseField name="createdAt" type="integer">
  Unix timestamp when the project was created
</ResponseField>

<ResponseField name="updatedAt" type="integer">
  Unix timestamp when the project was last updated
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST "https://public.reap.video/api/v1/automation/cancel-project" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "projectId": "65f1a2b3c4d5e6f7a8b9c0d2"
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://public.reap.video/api/v1/automation/cancel-project', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      projectId: '65f1a2b3c4d5e6f7a8b9c0d2'
    })
  });

  const project = await response.json();
  console.log(`Status: ${project.status}`);
  ```

  ```python Python theme={"system"}
  import requests

  headers = {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
  }

  data = {
      'projectId': '65f1a2b3c4d5e6f7a8b9c0d2'
  }

  response = requests.post(
      'https://public.reap.video/api/v1/automation/cancel-project',
      headers=headers,
      json=data
  )

  project = response.json()
  print(f"Status: {project['status']}")
  ```

  ```php PHP theme={"system"}
  <?php
  $data = [
      'projectId' => '65f1a2b3c4d5e6f7a8b9c0d2'
  ];

  $ch = curl_init('https://public.reap.video/api/v1/automation/cancel-project');
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer YOUR_API_KEY',
      'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  curl_close($ch);
  $project = json_decode($response, true);
  echo 'Status: ' . $project['status'] . "\n";
  ?>
  ```

  ```go Go theme={"system"}
  package main
  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )
  func main() {
      data := map[string]string{
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
      }
      body, _ := json.Marshal(data)
      req, _ := http.NewRequest("POST", "https://public.reap.video/api/v1/automation/cancel-project", bytes.NewBuffer(body))
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      respBody, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(respBody))
  }
  ```

  ```java Java theme={"system"}
  import java.io.*;
  import java.net.HttpURLConnection;
  import java.net.URL;
  public class CancelProjectExample {
      public static void main(String[] args) throws Exception {
          URL url = new URL("https://public.reap.video/api/v1/automation/cancel-project");
          HttpURLConnection conn = (HttpURLConnection) url.openConnection();
          conn.setRequestMethod("POST");
          conn.setRequestProperty("Authorization", "Bearer YOUR_API_KEY");
          conn.setRequestProperty("Content-Type", "application/json");
          conn.setDoOutput(true);
          String jsonBody = "{\"projectId\":\"65f1a2b3c4d5e6f7a8b9c0d2\"}";
          try (OutputStream os = conn.getOutputStream()) {
              os.write(jsonBody.getBytes("utf-8"));
          }
          BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
          StringBuilder response = new StringBuilder();
          String responseLine;
          while ((responseLine = br.readLine()) != null) {
              response.append(responseLine.trim());
          }
          System.out.println(response.toString());
      }
  }
  ```
</CodeGroup>

## Example Response

<CodeGroup>
  <CodeGroup.Tab label="200 OK">
    ```json theme={"system"}
    {
      "id": "65f1a2b3c4d5e6f7a8b9c0d2",
      "title": "My Podcast Episode",
      "thumbnail": "https://cdn.reap.video/thumbnails/65f1a2b3c4d5e6f7a8b9c0d2.jpg",
      "billedDuration": 1800.5,
      "status": "cancelled",
      "projectType": "clipping",
      "source": "Upload",
      "genre": "talking",
      "topics": [],
      "clipDurations": [],
      "selectedStart": 0,
      "selectedEnd": null,
      "reframeClips": true,
      "exportResolution": 1080,
      "exportOrientation": "portrait",
      "captionsPreset": "system_beasty",
      "enableCaptions": true,
      "enableEmojis": true,
      "enableHighlights": true,
      "language": "en",
      "dubbingLanguage": null,
      "translateTranscription": false,
      "translationLanguages": [],
      "transcriptionScript": "native",
      "metadata": {
        "duration": 1800.5,
        "width": 1920,
        "height": 1080,
        "fps": 30,
        "bitrate": 5000000,
        "size": 450000000,
        "codec": "h264"
      },
      "urls": {
        "projectUrl": "https://app.reap.video/project/65f1a2b3c4d5e6f7a8b9c0d2"
      },
      "createdAt": 1710000000,
      "updatedAt": 1710005000
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Already Finished">
    ```json theme={"system"}
    {
      "detail": "Only a project that is still processing can be cancelled."
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Not Cancellable Yet">
    ```json theme={"system"}
    {
      "detail": "This project can't be cancelled at its current stage."
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="401 Unauthorized">
    ```json theme={"system"}
    {
      "detail": "Unauthorized - Invalid or missing API key"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="404 Not Found">
    ```json theme={"system"}
    {
      "detail": "Project not found"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="429 Too Many Requests">
    ```json theme={"system"}
    {
      "detail": "Too Many Requests - Rate limit of 10 requests per minute exceeded"
    }
    ```
  </CodeGroup.Tab>
</CodeGroup>


## OpenAPI

````yaml POST /automation/cancel-project
openapi: 3.1.0
info:
  title: Reap Automation API
  description: AI-powered video processing automation API
  version: 1.0.0
servers:
  - url: https://public.reap.video/api/v1
security:
  - bearerAuth: []
paths:
  /automation/cancel-project:
    post:
      summary: Cancel Project
      description: Cancel a project that is still processing and refund its credits
      operationId: cancelProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelProjectRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationProject'
components:
  schemas:
    CancelProjectRequest:
      type: object
      required:
        - projectId
      properties:
        projectId:
          type: string
          description: ID of the project to cancel
    AutomationProject:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        thumbnail:
          type: string
        billedDuration:
          type: number
        status:
          type: string
          enum:
            - queued
            - prepped
            - draft
            - processing
            - finalizing
            - completed
            - invalid
            - expired
            - failed
            - error
        projectType:
          type: string
          enum:
            - clipping
            - captions
            - reframe
            - dubbing
            - transcription
        source:
          type: string
          enum:
            - Upload
            - Youtube
            - Vimeo
            - TwitchVod
            - Twitter
            - RumbleEmbed
            - Generic
        genre:
          $ref: '#/components/schemas/VideoGenre'
        topics:
          type: array
          items:
            type: string
        clipDurations:
          type: array
          items:
            type: array
            items:
              type: integer
        selectedStart:
          type: number
          nullable: true
        selectedEnd:
          type: number
          nullable: true
        reframeClips:
          type: boolean
        exportResolution:
          type: integer
        exportOrientation:
          $ref: '#/components/schemas/VideoOrientation'
        captionsPreset:
          type: string
          nullable: true
        enableCaptions:
          type: boolean
        enableEmojis:
          type: boolean
        enableHighlights:
          type: boolean
        language:
          type: string
          nullable: true
        dubbingLanguage:
          type: string
          nullable: true
        translateTranscription:
          type: boolean
        translationLanguages:
          type: array
          items:
            type: string
        transcriptionScript:
          $ref: '#/components/schemas/TranscriptionScript'
        metadata:
          $ref: '#/components/schemas/VideoFileMeta'
        urls:
          type: object
        createdAt:
          type: integer
        updatedAt:
          type: integer
    VideoGenre:
      type: string
      enum:
        - talking
        - screenshare
        - gaming
      default: talking
    VideoOrientation:
      type: string
      enum:
        - landscape
        - portrait
        - square
    TranscriptionScript:
      type: string
      enum:
        - native
        - roman
      default: native
    VideoFileMeta:
      type: object
      properties:
        width:
          type: integer
        height:
          type: integer
        aspectRatio:
          type: string
        size:
          type: number
        bitrate:
          type: number
        fps:
          type: number
        duration:
          type: number
        rotation:
          type: integer
        resolution:
          type: integer
        codec:
          type: string
        codecFullName:
          type: string
        codecTag:
          type: string
        format:
          type: string
        formatFullName:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````