create

suspend fun create(broadcasterId: String, title: String? = null, duration: Double? = null): CreatedClip

Twitch API: Create Clip

Creates a clip from the broadcaster's stream. This API captures up to 90 seconds of the broadcaster's stream. By default, Twitch publishes up to the last 30 seconds of the 90 seconds window and provides a default title for the clip.

Creating a clip is an asynchronous process. To determine whether the clip was successfully created, call get using the clip ID that this request returned. If after 15 seconds get hasn't returned the clip, assume it failed.

Return

the created clip info containing the clip ID and edit URL.

Parameters

broadcasterId

the ID of the broadcaster whose stream you want to create a clip from.

title

the title of the clip.

duration

the length of the clip in seconds. Possible values range from 5 to 60 inclusively with a precision of 0.1. The default is 30.