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

# Generate Shortform Edit

> AI-powered video editing with automatic retake and pause removal

## POST /api/v1/editing/generate-shortform-edit

Takes a video URL, analyzes it with AI, removes unwanted parts (retakes, pauses, filler), and returns an edited video.

### Parameters

| Parameter  | Type | Required | Description            |
| ---------- | ---- | -------- | ---------------------- |
| video\_url | URL  | ✅ Yes    | Link to the video file |

### Response

| Field                  | Description                                    |
| ---------------------- | ---------------------------------------------- |
| video\_url             | Link to your edited video (valid for 24 hours) |
| original\_duration\_ms | How long the original video was (milliseconds) |
| edited\_duration\_ms   | How long the edited video is (milliseconds)    |
| reduction\_percent     | How much was cut (as percentage)               |

### Example Request

```bash theme={null}
curl -X POST https://api.instinct.com/api/v1/editing/generate-shortform-edit \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://example.com/video.mp4"
  }'
```

### Example Response

```json theme={null}
{ 
  "video_url": "https://cdn.instinct.com/edited/video_123.mp4",
  "original_duration_ms": 180000,
  "edited_duration_ms": 120000,
  "reduction_percent": 33.33
}
```

### Notes

* The edited video URL is valid for 24 hours
* Processing time varies based on video length


## OpenAPI

````yaml POST /api/v1/editing/generate-shortform-edit
openapi: 3.0.3
info:
  title: Instinct API
  description: AI-powered video editing and caption generation API
  version: 1.0.0
servers:
  - url: https://api.instinct.com
    description: Production
security: []
paths:
  /api/v1/editing/generate-shortform-edit:
    post:
      tags:
        - Editing
      summary: Generate Shortform Edit
      description: >-
        Takes a video URL, analyzes it with AI, removes unwanted parts (retakes,
        pauses, filler), and returns an edited video
      operationId: generateShortformEdit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShortformEditRequest'
      responses:
        '200':
          description: Video edited successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortformEditResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ShortformEditRequest:
      type: object
      properties:
        video_url:
          type: string
          format: uri
          description: Link to the video file
          example: https://example.com/video.mp4
      required:
        - video_url
    ShortformEditResponse:
      type: object
      properties:
        video_url:
          type: string
          format: uri
          description: Link to your edited video (valid for 24 hours)
          example: https://cdn.instinct.com/edited/video_123.mp4
        original_duration_ms:
          type: integer
          description: How long the original video was (milliseconds)
          example: 180000
        edited_duration_ms:
          type: integer
          description: How long the edited video is (milliseconds)
          example: 120000
        reduction_percent:
          type: number
          description: How much was cut (as percentage)
          example: 33.33
      required:
        - video_url
        - original_duration_ms
        - edited_duration_ms
        - reduction_percent
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message

````