---
title: Clip videos given a start and end time
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Stream](https://developers.cloudflare.com/api/go/resources/stream)

[Clip](https://developers.cloudflare.com/api/go/resources/stream/subresources/clip)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Clip videos given a start and end time

client.Stream.Clip.New(ctx, params) (\*[Video](<https://developers.cloudflare.com/api/go/resources/stream#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/stream/clip

Clips a video based on the specified start and end times provided in seconds.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Stream Write`

##### ParametersExpand Collapse

<details>

<summary>

params ClipNewParams

</summary>

AccountID param.Field\[string]

Path param: The account identifier tag.

maxLength32

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

ClippedFromVideoUID param.Field\[string]

Body param: The unique video identifier (UID).

maxLength32

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20clippedFromVideoUID">Link to this property</a>

EndTimeSeconds param.Field\[int64]

Body param: Specifies the end time for the video clip in seconds.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20endTimeSeconds">Link to this property</a>

StartTimeSeconds param.Field\[int64]

Body param: Specifies the start time for the video clip in seconds.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20startTimeSeconds">Link to this property</a>

AllowedOrigins param.Field\[\[]<a href="https://developers.cloudflare.com/api/go/resources/stream#(resource)%20stream%20%3E%20(model)%20allowed_origins%20%3E%20(schema)">AllowedOrigins</a>]Optional

Body param: Lists the origins allowed to display the video. Enter allowed origin domains in an array and use <code>*</code> for wildcard subdomains. Empty arrays allow the video to be viewed on any origin.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20allowedOrigins">Link to this property</a>

Creator param.Field\[string]Optional

Body param: A user-defined identifier for the media creator.

maxLength64

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20creator">Link to this property</a>

Input param.Field\[string]Optional

Body param: A video’s URL. Preferred over ‘url’.

formaturi

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20input">Link to this property</a>

Meta param.Field\[unknown]Optional

Body param: A user modifiable key-value store used to reference other systems of record for managing videos.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20meta">Link to this property</a>

Name param.Field\[string]Optional

Body param: A name for the video.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20name">Link to this property</a>

RequireSignedURLs param.Field\[bool]Optional

Body param: Indicates whether the video can be a accessed using the UID. When set to <code>true</code>, a signed token must be generated with a signing key to view the video.

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20requireSignedURLs">Link to this property</a>

ScheduledDeletion param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/stream/subresources/clip/methods/create#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20scheduledDeletion%20%3E%20(schema)">Time</a>]Optional

Body param: Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a <code>null</code> value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time.

formatdate-time

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20scheduledDeletion">Link to this property</a>

ThumbnailTimestampPct param.Field\[float64]Optional

Body param: The timestamp for a thumbnail image calculated as a percentage value of the video’s duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.

maximum1

minimum0

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20thumbnailTimestampPct">Link to this property</a>

URL param.Field\[string]Optional

Body param: A video’s URL (legacy field, use ‘input’ instead).

formaturi

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20url">Link to this property</a>

<details>

<summary>

Watermark param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/stream/subresources/clip/methods/create#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20watermark%20%3E%20(schema)">ClipNewParamsWatermark</a>]Optional

Body param

</summary>

UID stringOptional

The unique identifier for the watermark profile.

maxLength32

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20watermark%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

</details>

<a href="#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20watermark">Link to this property</a>

</details>

[Link to this property](<#(resource)%20stream.clip%20%3E%20(method)%20create%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type Video struct{…}

</summary>

AllowedOrigins \[]<a href="https://developers.cloudflare.com/api/go/resources/stream#(resource)%20stream%20%3E%20(model)%20allowed_origins%20%3E%20(schema)">AllowedOrigins</a>Optional

Lists the origins allowed to display the video. Enter allowed origin domains in an array and use <code>*</code> for wildcard subdomains. Empty arrays allow the video to be viewed on any origin.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20allowedOrigins">Link to this property</a>

ClippedFrom stringOptional

The unique identifier of the source video this video was clipped from.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20clippedFrom">Link to this property</a>

Created TimeOptional

The date and time the media item was created.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

Creator stringOptional

A user-defined identifier for the media creator.

maxLength64

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20creator">Link to this property</a>

Duration float64Optional

The duration of the video in seconds. A value of <code>-1</code> means the duration is unknown. The duration becomes available after the upload and before the video is ready.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20duration">Link to this property</a>

<details>

<summary>

Input VideoInputOptional

</summary>

Height int64Optional

The video height in pixels. A value of <code>-1</code> means the height is unknown. The value becomes available after the upload and before the video is ready.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20input%20%3E%20(property)%20height">Link to this property</a>

Width int64Optional

The video width in pixels. A value of <code>-1</code> means the width is unknown. The value becomes available after the upload and before the video is ready.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20input%20%3E%20(property)%20width">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20input">Link to this property</a>

LiveInput stringOptional

The live input ID used to upload a video with Stream Live.

maxLength32

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20liveInput">Link to this property</a>

MaxDurationSeconds int64Optional

The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of <code>-1</code> means the value is unknown.

maximum36000

minimum1

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20maxDurationSeconds">Link to this property</a>

MaxSizeBytes int64Optional

The maximum size in bytes for the video upload.

formatint64

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20maxSizeBytes">Link to this property</a>

Meta unknownOptional

A user modifiable key-value store used to reference other systems of record for managing videos.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20meta">Link to this property</a>

Modified TimeOptional

The date and time the media item was last modified.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

<details>

<summary>

Playback VideoPlaybackOptional

</summary>

Dash stringOptional

DASH Media Presentation Description for the video.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20playback%20%3E%20(property)%20dash">Link to this property</a>

Hls stringOptional

The HLS manifest for the video.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20playback%20%3E%20(property)%20hls">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20playback">Link to this property</a>

Preview stringOptional

The video’s preview page URI. This field is omitted until encoding is complete.

formaturi

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20preview">Link to this property</a>

<details>

<summary>

PublicDetails VideoPublicDetailsOptional

Public details for the video including title, share link, channel link, and logo.

</summary>

ChannelLink stringOptional

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails%20%3E%20(property)%20channel_link">Link to this property</a>

Logo stringOptional

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails%20%3E%20(property)%20logo">Link to this property</a>

MediaID int64Optional

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails%20%3E%20(property)%20media_id">Link to this property</a>

ShareLink stringOptional

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails%20%3E%20(property)%20share_link">Link to this property</a>

Title stringOptional

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails%20%3E%20(property)%20title">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20publicDetails">Link to this property</a>

ReadyToStream boolOptional

Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20readyToStream">Link to this property</a>

ReadyToStreamAt TimeOptional

Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20readyToStreamAt">Link to this property</a>

RequireSignedURLs boolOptional

Indicates whether the video can be a accessed using the UID. When set to <code>true</code>, a signed token must be generated with a signing key to view the video.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20requireSignedURLs">Link to this property</a>

ScheduledDeletion TimeOptional

Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a <code>null</code> value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20scheduledDeletion">Link to this property</a>

Size float64Optional

The size of the media item in bytes.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20size">Link to this property</a>

<details>

<summary>

Status VideoStatusOptional

Specifies a detailed status for a video. If the <code>state</code> is <code>inprogress</code> or <code>error</code>, the <code>step</code> field returns <code>encoding</code> or <code>manifest</code>. If the <code>state</code> is <code>inprogress</code>, <code>pctComplete</code> returns a number between 0 and 100 to indicate the approximate percent of completion. If the <code>state</code> is <code>error</code>, <code>errorReasonCode</code> and <code>errorReasonText</code> provide additional details.

</summary>

ErrorReasonCode stringOptional

Specifies why the video failed to encode. This field is empty if the video is not in an <code>error</code> state. Preferred for programmatic use.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20errorReasonCode">Link to this property</a>

ErrorReasonText stringOptional

Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an <code>error</code> state.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20errorReasonText">Link to this property</a>

PctComplete stringOptional

Indicates the progress as a percentage between 0 and 100.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20pctComplete">Link to this property</a>

<details>

<summary>

State VideoStatusStateOptional

Specifies the processing status for all quality levels for a video.

</summary>

One of the following:

const VideoStatusStatePendingupload VideoStatusState = "pendingupload"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

const VideoStatusStateDownloading VideoStatusState = "downloading"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

const VideoStatusStateQueued VideoStatusState = "queued"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%202">Link to this property</a>

const VideoStatusStateInprogress VideoStatusState = "inprogress"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%203">Link to this property</a>

const VideoStatusStateReady VideoStatusState = "ready"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%204">Link to this property</a>

const VideoStatusStateError VideoStatusState = "error"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%205">Link to this property</a>

const VideoStatusStateLiveInprogress VideoStatusState = "live-inprogress"

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(property)%20state">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

Thumbnail stringOptional

The media item’s thumbnail URI. This field is omitted until encoding is complete.

formaturi

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20thumbnail">Link to this property</a>

ThumbnailTimestampPct float64Optional

The timestamp for a thumbnail image calculated as a percentage value of the video’s duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.

maximum1

minimum0

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20thumbnailTimestampPct">Link to this property</a>

UID stringOptional

A Cloudflare-generated unique identifier for a media item.

maxLength32

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

Uploaded TimeOptional

The date and time the media item was uploaded.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20uploaded">Link to this property</a>

UploadExpiry TimeOptional

The date and time when the video upload URL is no longer valid for direct user uploads.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20uploadExpiry">Link to this property</a>

<details>

<summary>

Watermark <a href="https://developers.cloudflare.com/api/go/resources/stream#(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)">Watermark</a>Optional

</summary>

Created TimeOptional

The date and a time a watermark profile was created.

formatdate-time

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

DownloadedFrom stringOptional

The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20downloadedFrom">Link to this property</a>

Height int64Optional

The height of the image in pixels.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20height">Link to this property</a>

Name stringOptional

A short description of the watermark profile.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Opacity float64Optional

The translucency of the image. A value of <code>0.0</code> makes the image completely transparent, and <code>1.0</code> makes the image completely opaque. Note that if the image is already semi-transparent, setting this to <code>1.0</code> will not make the image completely opaque.

maximum1

minimum0

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20opacity">Link to this property</a>

Padding float64Optional

The whitespace between the adjacent edges (determined by position) of the video and the image. <code>0.0</code> indicates no padding, and <code>1.0</code> indicates a fully padded video width or length, as determined by the algorithm.

maximum1

minimum0

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20padding">Link to this property</a>

Position stringOptional

The location of the image. Valid positions are: <code>upperRight</code>, <code>upperLeft</code>, <code>lowerLeft</code>, <code>lowerRight</code>, and <code>center</code>. Note that <code>center</code> ignores the <code>padding</code> parameter.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20position">Link to this property</a>

Scale float64Optional

The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. <code>0.0</code> indicates no scaling (use the size of the image as-is), and <code>1.0</code> fills the entire video.

maximum1

minimum0

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20scale">Link to this property</a>

Size float64Optional

The size of the image in bytes.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20size">Link to this property</a>

UID stringOptional

The unique identifier for a watermark profile.

maxLength32

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

Width int64Optional

The width of the image in pixels.

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark%20%2B%20(resource)%20stream.watermarks%20%3E%20(model)%20watermark%20%3E%20(schema)%20%3E%20(property)%20width">Link to this property</a>

</details>

<a href="#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)%20%3E%20(property)%20watermark">Link to this property</a>

</details>

[Link to this property](<#(resource)%20stream%20%3E%20(model)%20video%20%3E%20(schema)>)

### Clip videos given a start and end time

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/stream"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  video, err := client.Stream.Clip.New(context.TODO(), stream.ClipNewParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    ClippedFromVideoUID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    EndTimeSeconds: cloudflare.F(int64(0)),
    StartTimeSeconds: cloudflare.F(int64(0)),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", video.UID)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "allowedOrigins": [
      "example.com"
    ],
    "clippedFrom": "ea95132c15732412d22c1476fa83f27a",
    "created": "2014-01-02T02:20:00Z",
    "creator": "creator-id_abcde12345",
    "duration": 0,
    "input": {
      "height": 0,
      "width": 0
    },
    "liveInput": "fc0a8dc887b16759bfd9ad922230a014",
    "maxDurationSeconds": 1,
    "maxSizeBytes": 0,
    "meta": {
      "name": "video12345.mp4"
    },
    "modified": "2014-01-02T02:20:00Z",
    "playback": {
      "dash": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd",
      "hls": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8"
    },
    "preview": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/watch",
    "publicDetails": {
      "channel_link": "channel_link",
      "logo": "logo",
      "media_id": 0,
      "share_link": "share_link",
      "title": "title"
    },
    "readyToStream": true,
    "readyToStreamAt": "2014-01-02T02:20:00Z",
    "requireSignedURLs": true,
    "scheduledDeletion": "2014-01-02T02:20:00Z",
    "size": 4190963,
    "status": {
      "errorReasonCode": "ERR_NON_VIDEO",
      "errorReasonText": "The file was not recognized as a valid video file.",
      "pctComplete": "45",
      "state": "inprogress"
    },
    "thumbnail": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg",
    "thumbnailTimestampPct": 0.529241,
    "uid": "ea95132c15732412d22c1476fa83f27a",
    "uploaded": "2014-01-02T02:20:00Z",
    "uploadExpiry": "2014-01-02T02:20:00Z",
    "watermark": {
      "created": "2014-01-02T02:20:00Z",
      "downloadedFrom": "https://company.com/logo.png",
      "height": 0,
      "name": "Marketing Videos",
      "opacity": 0.75,
      "padding": 0.1,
      "position": "center",
      "scale": 0.1,
      "size": 29472,
      "uid": "ea95132c15732412d22c1476fa83f27a",
      "width": 0
    }
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "allowedOrigins": [
      "example.com"
    ],
    "clippedFrom": "ea95132c15732412d22c1476fa83f27a",
    "created": "2014-01-02T02:20:00Z",
    "creator": "creator-id_abcde12345",
    "duration": 0,
    "input": {
      "height": 0,
      "width": 0
    },
    "liveInput": "fc0a8dc887b16759bfd9ad922230a014",
    "maxDurationSeconds": 1,
    "maxSizeBytes": 0,
    "meta": {
      "name": "video12345.mp4"
    },
    "modified": "2014-01-02T02:20:00Z",
    "playback": {
      "dash": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd",
      "hls": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8"
    },
    "preview": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/watch",
    "publicDetails": {
      "channel_link": "channel_link",
      "logo": "logo",
      "media_id": 0,
      "share_link": "share_link",
      "title": "title"
    },
    "readyToStream": true,
    "readyToStreamAt": "2014-01-02T02:20:00Z",
    "requireSignedURLs": true,
    "scheduledDeletion": "2014-01-02T02:20:00Z",
    "size": 4190963,
    "status": {
      "errorReasonCode": "ERR_NON_VIDEO",
      "errorReasonText": "The file was not recognized as a valid video file.",
      "pctComplete": "45",
      "state": "inprogress"
    },
    "thumbnail": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg",
    "thumbnailTimestampPct": 0.529241,
    "uid": "ea95132c15732412d22c1476fa83f27a",
    "uploaded": "2014-01-02T02:20:00Z",
    "uploadExpiry": "2014-01-02T02:20:00Z",
    "watermark": {
      "created": "2014-01-02T02:20:00Z",
      "downloadedFrom": "https://company.com/logo.png",
      "height": 0,
      "name": "Marketing Videos",
      "opacity": 0.75,
      "padding": 0.1,
      "position": "center",
      "scale": 0.1,
      "size": 29472,
      "uid": "ea95132c15732412d22c1476fa83f27a",
      "width": 0
    }
  }
}
```