# Opus Clip

> Create clip projects, organize clips into collections and manage social publishing.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/opus-clip

## Actions

### Add clip to collection

Add clip to collection.

**Inputs**

- Collection (`collection_id`, text, required): The collectionID of the collection that you want to add the clip to.
- Content ID (`content_id`, text, required): The ID of the clip that you want to add to the collection. FullClipId: {projectId}.{curationId}

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "collectionId": "example",
      "contentId": "example"
    }
  }
}
```

### Cancel scheduled social post

Cancel a scheduled publish task before its publish time.

**Inputs**

- Schedule ID (`schedule_id`, text, required): Unique ID of the schedule task to cancel

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {}
  }
}
```

### Create censor job

Create censor job.

**Inputs**

- Project ID (`project_id`, text, required): The project id that you want to censor.
- Clip ID (`clip_id`, text, required): The clip id that you want to censor.
- Options (`options`, object): Some options for the censor job.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "jobId": "example",
    "message": "example"
  }
}
```

### Create clip project

Create clip project.

**Inputs**

- Video URL (`video_url`, text, required): This parameter defines the url of the long-form video. OpusClip can import public videos from the following platforms: - YouTube, Google Drive, Vimeo, Zoom, Rumble, Twitch, Facebook, LinkedIn, X, Dropbox, Riverside, Loom, Frame.io, StreamYard - Any public video s3 link of an…
- Conclusion actions (`conclusion_actions`, list): Actions to be taken upon project conclusion, such as sending an email or triggering a webhook.
- Curation pref (`curation_pref`, object): Preferences for advanced curation of the video.
- Import pref (`import_pref`, object): Preferences for importing the video, such as source language.
- Brand template (`brand_template_id`, text): ID of the brand template to be used for the project.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "cluster": "example",
    "clusterJobId": "example",
    "createdAt": "example",
    "curationPref": {
      "clipDurations": [],
      "enableAutoHook": false,
      "genre": "example",
      "range": {
        "endSec": 1.0,
        "startSec": 1.0
      },
      "topicKeywords": []
    },
    "error": "example",
    "id": "example",
    "importPref": {
      "sourceLang": "example"
    },
    "isDeleted": false,
    "isPurged": false,
    "labels": [],
    "model": "example",
    "orgId": "example",
    "permissions": [],
    "productTier": "example",
    "projectId": "example",
    "promptRecommendations": [],
    "refundStatus": "example",
    "renderPref": {
      "enableAutoLayout": false,
      "enableBroll": false,
      "enableCaption": false,
      "enableCrop": false,
      "enableEmoji": false,
      "enableFillLayout": false,
      "enableFitLayout": false,
      "enableFourLayout": false,
      "enableHighlight": false,
      "enableScreenLayout": false,
      "enableSplitLayout": false,
      "enableThreeLayout": false,
      "enableUppercase": false,
      "enableVisualHook": false,
      "enableWatermark": false,
      "fitLayoutCropRatio": "example",
      "font": {
        "color": "example",
        "family": "example",
        "id": "example",
        "name": "example",
        "numericalSize": 1.0,
        "path": "example",
        "shadow": {},
        "size": "example",
        "stroke": {},
        "style": [],
        "textDecoration": "example",
        "type": "example"
      },
      "highlightColor": {
        "primary": "example",
        "secondary": "example"
      },
      "layoutAspectRatio": "example"
    },
    "sourceId": "example",
    "sourcePlatform": "example",
    "sourceUri": "example",
    "stage": "example",
    "stallCount": 1.0,
    "storageExpireAt": "example",
    "storageSize": 1.0,
    "storageStatus": "example",
    "updatedAt": "example",
    "userId": "example",
    "visibility": "example",
    "workerUrl": "example"
  }
}
```

### Create collection

Create collection.

**Inputs**

- Collection name (`collection_name`, text, required): The name of the collection that you want to create.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "collectionId": "example",
      "collectionName": "example",
      "createdAt": "example",
      "updatedAt": "example"
    }
  }
}
```

### Create thumbnail job

Experimental. Subject to change; daily caps apply and the endpoint may be temporarily disabled via a runtime kill switch. Currently the only published jobType is thumbnail (7 credits/call, charged on success and refunded on failure).

**Inputs**

- Source URI (`source_uri`, text, required): URL of the source video to extract thumbnails from.
- Reference image URI (`reference_image_uri`, text): Optional reference image URL. The thumbnail composition draws stylistic cues from this image. Upload via POST /api/upload-links-v2 with usecase: 'FreeToolMedia' and the image's extension (for example png), send the returned requiredHeaders on the upload, then pass the…
- Mask image URI (`mask_image_uri`, text): Optional mask image URL for inpainting.
- Prompt (`prompt`, text): Optional text prompt steering the thumbnail composition.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "jobId": "example"
  }
}
```

### Delete collection

Delete collection.

**Inputs**

- Collection (`collection_id`, text, required): The unique collection ID of the collection that you want to delete.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": "example"
  }
}
```

### Export collection

Export collection.

**Inputs**

- Collection (`collection_id`, text, required): The collectionID of the collection that you want to export

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "contentList": []
    }
  }
}
```

### Get censor job

Get censor job.

**Inputs**

- Job ID (`job_id`, text, required): The jobId that you want to get the status of.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "error": "example",
    "status": "example"
  }
}
```

### Get clip project

Get clip project.

**Inputs**

- Project ID (`project_id`, text, required): Project ID.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "cluster": "example",
    "clusterJobId": "example",
    "createdAt": "example",
    "curationPref": {
      "clipDurations": [],
      "enableAutoHook": false,
      "genre": "example",
      "range": {
        "endSec": 1.0,
        "startSec": 1.0
      },
      "topicKeywords": []
    },
    "error": "example",
    "id": "example",
    "importPref": {
      "sourceLang": "example"
    },
    "isDeleted": false,
    "isPurged": false,
    "labels": [],
    "model": "example",
    "orgId": "example",
    "permissions": [],
    "productTier": "example",
    "projectId": "example",
    "promptRecommendations": [],
    "refundStatus": "example",
    "renderPref": {
      "enableAutoLayout": false,
      "enableBroll": false,
      "enableCaption": false,
      "enableCrop": false,
      "enableEmoji": false,
      "enableFillLayout": false,
      "enableFitLayout": false,
      "enableFourLayout": false,
      "enableHighlight": false,
      "enableScreenLayout": false,
      "enableSplitLayout": false,
      "enableThreeLayout": false,
      "enableUppercase": false,
      "enableVisualHook": false,
      "enableWatermark": false,
      "fitLayoutCropRatio": "example",
      "font": {
        "color": "example",
        "family": "example",
        "id": "example",
        "name": "example",
        "numericalSize": 1.0,
        "path": "example",
        "shadow": {},
        "size": "example",
        "stroke": {},
        "style": [],
        "textDecoration": "example",
        "type": "example"
      },
      "highlightColor": {
        "primary": "example",
        "secondary": "example"
      },
      "layoutAspectRatio": "example"
    },
    "sourceId": "example",
    "sourcePlatform": "example",
    "sourceUri": "example",
    "stage": "example",
    "stallCount": 1.0,
    "storageExpireAt": "example",
    "storageSize": 1.0,
    "storageStatus": "example",
    "updatedAt": "example",
    "userId": "example",
    "visibility": "example",
    "workerUrl": "example"
  }
}
```

### Get thumbnail job

Experimental. Returns status, progress, and result for a job created via POST /api/generative-jobs. For thumbnail jobs, the result.generatedThumbnailUris array contains the CDN URLs of the produced thumbnails when status is CONCLUDED.

**Inputs**

- Job ID (`job_id`, text, required): The jobId returned by POST /api/generative-jobs.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "error": {
      "message": "example",
      "type": "example"
    },
    "progress": {
      "percentage": 1.0,
      "status": "example"
    },
    "result": {
      "generatedThumbnailUris": []
    },
    "status": "example"
  }
}
```

### Get transcript

Fetch the trimmed source-video transcript for a project. ASR internals (seek, tokens, log-probabilities, etc.) are stripped. For API callers on a range-limited project, paragraphs are filtered to the billed curation range; internal callers and full-source submissions get the…

**Inputs**

- Project ID (`project_id`, text, required): Project ID.

**Outputs**

- `data` (object): Wrapper for the transcript response. data[0] is the transcript, or null when the project has no transcript yet.

**Example output**

```json
{
  "data": {
    "data": []
  }
}
```

### List brand templates

List brand templates.

**Inputs**: None.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List collections

List collections.

**Inputs**

- Q (`q`, text): Query type q = mine means list collections of your account. q = findByContentId means list collections contained the specific content(clip). One of: `findByContentId`, `mine`.
- Content ID (`content_id`, text): If specified, will only return collections that contain the clip with this contentID.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "limit": 1.0,
      "list": [],
      "total": 1.0
    }
  }
}
```

### List exportable clips

List exportable clips.

**Inputs**

- X opus org ID (`x_opus_org_id`, text): Organization ID. Required for users with multiple organizations.
- Project ID (`project_id`, text): Project ID, required when q=findByProjectId
- Collection (`collection_id`, text): Collection ID, required when q=findByCollectionId
- Page num (`page_num`, number): Page Num, started with 1. At least 1.
- Page size (`page_size`, number): Page Size. At least 1.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List social accounts

Retrieve the connected social destinations available for social posting.

**Inputs**: None.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": []
  }
}
```

### Publish social post

Publish a clip immediately to a connected social account. Each X (formerly Twitter) post costs 3 credits.

**Inputs**

- Project ID (`project_id`, text, required): Project ID
- Clip ID (`clip_id`, text, required): Bare clip ID (e.g. qU3iVMSO77). Not the composite {projectId}.{clipId} form returned as id by GET /api/exportable-clips. pass only the part after the dot.
- Post account ID (`post_account_id`, text, required): Unique ID of the connected social account record
- Sub account ID (`sub_account_id`, text): Sub-account ID used by Facebook pages, Instagram business accounts, or LinkedIn
- Post detail (`post_detail`, object, required): Post detail.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "postId": "example"
    }
  }
}
```

### Remove clip from collection

Remove clip from collection.

**Inputs**

- Collection (`collection_id`, text, required): The collectionID of the collection that you want to remove the clip from.
- Content ID (`content_id`, text, required): The ID of the clip that you want to remove from the collection. FullClipId: {projectId}.{curationId}

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": "example"
  }
}
```

### Schedule social post

Schedule a clip to be published later. The publishAt value must be a future UTC ISO 8601 timestamp. Each X (formerly Twitter) post costs 3 credits.

**Inputs**

- Project ID (`project_id`, text, required): Project ID
- Clip ID (`clip_id`, text, required): Bare clip ID (e.g. qU3iVMSO77). Not the composite {projectId}.{clipId} form returned as id by GET /api/exportable-clips. pass only the part after the dot.
- Post account ID (`post_account_id`, text, required): Unique ID of the connected social account record
- Sub account ID (`sub_account_id`, text): Sub-account ID used by Facebook pages, Instagram business accounts, or LinkedIn
- Publish at (`publish_at`, date and time, required): Future publish time in UTC ISO 8601 format
- Post detail (`post_detail`, object, required): Post detail.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "data": {
      "scheduleId": "example"
    }
  }
}
```

### Update clip project visibility

Update clip project visibility.

**Inputs**

- Project ID (`project_id`, text, required): Project ID.
- Visibility (`visibility`, text, required): The visibility of the project. DEFAULT: Team members can open, edit and export the project. PUBLIC: Anyone can open, edit and export the project. One of: `DEFAULT`, `PUBLIC`.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "cluster": "example",
    "clusterJobId": "example",
    "createdAt": "example",
    "curationPref": {
      "clipDurations": [],
      "enableAutoHook": false,
      "genre": "example",
      "range": {
        "endSec": 1.0,
        "startSec": 1.0
      },
      "topicKeywords": []
    },
    "error": "example",
    "id": "example",
    "importPref": {
      "sourceLang": "example"
    },
    "isDeleted": false,
    "isPurged": false,
    "labels": [],
    "model": "example",
    "orgId": "example",
    "permissions": [],
    "productTier": "example",
    "projectId": "example",
    "promptRecommendations": [],
    "refundStatus": "example",
    "renderPref": {
      "enableAutoLayout": false,
      "enableBroll": false,
      "enableCaption": false,
      "enableCrop": false,
      "enableEmoji": false,
      "enableFillLayout": false,
      "enableFitLayout": false,
      "enableFourLayout": false,
      "enableHighlight": false,
      "enableScreenLayout": false,
      "enableSplitLayout": false,
      "enableThreeLayout": false,
      "enableUppercase": false,
      "enableVisualHook": false,
      "enableWatermark": false,
      "fitLayoutCropRatio": "example",
      "font": {
        "color": "example",
        "family": "example",
        "id": "example",
        "name": "example",
        "numericalSize": 1.0,
        "path": "example",
        "shadow": {},
        "size": "example",
        "stroke": {},
        "style": [],
        "textDecoration": "example",
        "type": "example"
      },
      "highlightColor": {
        "primary": "example",
        "secondary": "example"
      },
      "layoutAspectRatio": "example"
    },
    "sourceId": "example",
    "sourcePlatform": "example",
    "sourceUri": "example",
    "stage": "example",
    "stallCount": 1.0,
    "storageExpireAt": "example",
    "storageSize": 1.0,
    "storageStatus": "example",
    "updatedAt": "example",
    "userId": "example",
    "visibility": "example",
    "workerUrl": "example"
  }
}
```
