Live Videos

Create a live

POST
https://peertube2.cpy.re/api/v1/videos/live

Body

multipart/form-data
multipart/form-dataobject
Encoding
thumbnailfileimage/jpeg
previewfileimage/jpeg
channelIdintegerrequired

Channel id that will contain this live video

saveReplayboolean
Show child attributes
privacyVideoPrivacySet12345

privacy id of the video (see /videos/privacies)

permanentLiveboolean

User can stream multiple times in a permanent live

latencyModeLiveVideoLatencyMode

User can select live latency mode if enabled by the instance

Show child attributes

The live latency mode (Default = 1, High latency = 2, Small Latency = 3)

LiveVideoLatencyMode123
thumbnailfilestring<binary>

Live video/replay thumbnail file

previewfilestring<binary>deprecated

Deprecated in PeerTube v8.1, use thumbnailfile instead

privacyVideoPrivacySet12345

privacy id of the video (see /videos/privacies)

category id of the video (see /videos/categories)

Example
15

licence id of the video (see /videos/licences)

Example
2

language id of the video (see /videos/languages)

Example
en
descriptionstring

Live video/replay description

supportstring

A text tell the audience how to support the creator

Example
Please support our work on https://soutenir.framasoft.org/en/ <3
nsfwboolean

Whether or not this live video/replay contains sensitive content

nsfwSummaryany

More information about the sensitive content of the video

nsfwFlagsNSFWFlag0124

NSFW flags (can be combined using bitwise or operator)

  • 0 NONE
  • 1 VIOLENT
  • 2 EXPLICIT_SEX
namestringrequired

Live video/replay name

tagsArray<string>

Live video/replay tags (maximum 5 tags each between 2 and 30 characters)

commentsPolicyVideoCommentsPolicySet123

Comments policy of the video (Enabled = 1, Disabled = 2, Requires Approval = 3)

recommendationScopeVideoRecommendationScopeSet1234

Videos that can be recommended next to a video:

  • 1 All videos
  • 2 Only videos of the platform that owns the reference video (or of the current platform if no video is given)
  • 3 Only videos of the account that owns the reference video
  • 4 Only videos of the channel of the reference video

This is a preference of the video owner: applications displaying recommendations may not apply it

aiUsageVideoAIUsageSet1234

PeerTube >= 9.0 Use of AI in the video, declared by the video creator:

  • 1 Not specified
  • 2 No AI-generated content: nothing seen or heard in the video has been generated by AI
  • 3 Contains AI-generated content: some parts of the video have been generated by AI
  • 4 AI-generated: the whole video, or most of it, has been generated by AI
commercialContentVideoCommercialContentSet123

PeerTube >= 9.0 Commercial content in the video, declared by the video creator:

  • 1 None
  • 2 Promotional content: the creator promotes their own products, services or business
  • 3 Paid partnership: a third party paid, or provided goods or services, in exchange for the promotion
downloadEnabledboolean

Enable or disable downloading for the replay of this live video

Show child attributes
startAtstring<date-time>

Date when the stream is scheduled to air at

Response

successful operation

Response fields application/json
videoobject
Show child attributes
idid

object id for the video

Show child attributes
id>= 1
Example
42
uuidUUIDv4

universal identifier for the video, that can be used across instances

Show child attributes
UUIDv4<uuid>
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
400Bad Request

Disambiguate via code:

  • default type for a validation error
  • live_conflicting_permanent_and_save_replay for conflicting parameters set
403Forbidden

Disambiguate via code:

  • live_not_enabled for a disabled live feature
  • live_not_allowing_replay for a disabled replay feature
  • max_instance_lives_limit_reached for the absolute concurrent live limit
  • max_user_lives_limit_reached for the user concurrent live limit

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.