Skip to main content

Cloudflare/stream

@webframp/cloudflare/streamv2026.10.21.1· Apache-2.0· 5d agoBEHAVIORS
01README

Cloudflare Stream — video upload, encoding, delivery, live streaming

02Release Notes

2026.10.21.1

Changed: The README and the apiToken description now lead with a vault. Store the token with swamp vault put cloudflare API_TOKEN and set apiToken to ${{ vault.get("cloudflare", "API_TOKEN") }}. The CLOUDFLARE_API_TOKEN environment variable still works as a fallback, but swamp does not redact it, so it is no longer recommended. The missing-token error now says the same.

Changed: Method arguments that carry a secret are now marked sensitive, so swamp redacts them from logs and run records. Pass them as vault.get expressions. Affected: create_a_new_output_connected_to_a_live_input and create_signed_url_tokens_for_videos. The README's new "Secrets" section lists them per method.

Changed: Secrets returned by create_signing_keys, create_a_live_input, get_stream_live_inputs_retrieve_a_live_input, update_a_live_input, stream_live_inputs_disable_a_live_input, stream_live_inputs_enable_a_live_input and 6 more are now stored in a vault, and the stored resource holds a vault.get reference instead of the value. Because the model now declares secret output, swamp refuses to run any of the model's methods, reads included, until a vault exists (swamp vault create local_encryption cloudflare). The README's "Secrets" section lists what each method stores.

Changed: Secrets inside list items, maps or unions, which swamp cannot move into a vault, are now removed before the result is stored. Affected: list_all_outputs_associated_with_a_specified_live_input.

Fixed: create_signing_keys, create_webhooks, update_video_details, create_downloads and create_type_specific_downloads wrote to a resource the model does not declare, so they always failed. They now write the resource the model declares.

Fixed: Create methods whose response carries no id wrote every result to one instance named created, so each call overwrote the previous one. They now name the instance by the response's id or uid when present, else by the path parameter that scopes the call, else by a hash of the request arguments (secret arguments left out). Affected: create_stream_video_clipping_clip_videos_given_a_start_and_end_time, create_stream_videos_upload_videos_from_a_url, create_stream_videos_upload_videos_via_direct_upload_ur_ls, create_a_live_input, create_a_new_output_connected_to_a_live_input, create_watermark_profiles_via_basic_upload and 2 more.

Upgrade note: Resources stored by earlier versions of the methods in the README's "Secrets" section may hold plaintext secrets; delete them with swamp data delete and rotate the affected credentials. Results earlier versions wrote to the created instance stay there; new runs write under the new names.

03Behaviors1
@webframp/cloudflare/streamv2026.10.21.1cloudflare/stream.ts

Global Arguments

ArgumentTypeDescription
apiToken?stringCloudflare API token. Wire it with ${{ vault.get("cloudflare", "API_TOKEN") }}; never pass the literal token. The CLOUDFLARE_API_TOKEN environment variable is read as a fallback, but it is not redacted and is not recommended.
accountIdstringCloudflare account ID
fn list_videos(status?: string, creator?: string, type?: string, asc?: string, video_name?: string, search?: string, start?: string, end?: string, include_counts?: string, id?: string, name?: string, live_input_id?: string, before?: string, after?: string, limit?: number)
List videos
ArgumentTypeDescription
status?string
creator?string
type?string
asc?string
video_name?string
search?string
start?string
end?string
include_counts?string
id?stringFilter by video ID(s). Can be a single ID or a comma-separated list of IDs.
name?stringFilter by video name/UID(s). Can be a single name or a comma-separated list.
live_input_id?stringFilter by live input ID to find videos associated with a specific live stream.
before?stringAlias for 'end'. Returns videos created before this date/time (RFC 3339 format).
after?stringAlias for 'start'. Returns videos created after this date/time (RFC 3339 format).
limit?numberMaximum number of videos to return (default 1000, max 1000).
fn stream_videos_initiate_video_uploads_using_tus(direct_user?: string)
Initiate video uploads using TUS
ArgumentTypeDescription
direct_user?string
fn create_stream_video_clipping_clip_videos_given_a_start_and_end_time(allowedOrigins?: unknown, clippedFromVideoUID: unknown, creator?: unknown, endTimeSeconds: unknown, input?: string, meta?: unknown, name?: string, requireSignedURLs?: unknown, scheduledDeletion?: unknown, startTimeSeconds: unknown, thumbnailTimestampPct?: unknown, url?: string, watermark?: unknown)
Clip videos given a start and end time
ArgumentTypeDescription
allowedOrigins?unknown
clippedFromVideoUIDunknown
creator?unknown
endTimeSecondsunknown
input?stringA video's URL. Preferred over 'url'.
meta?unknown
name?stringA name for the video.
requireSignedURLs?unknown
scheduledDeletion?unknown
startTimeSecondsunknown
thumbnailTimestampPct?unknown
url?stringA video's URL (legacy field, use 'input' instead).
watermark?unknown
fn create_stream_videos_upload_videos_from_a_url(allowedOrigins?: unknown, creator?: unknown, input?: string, meta?: unknown, name?: string, requireSignedURLs?: unknown, scheduledDeletion?: unknown, thumbnailTimestampPct?: unknown, url?: string, watermark?: unknown)
Upload videos from a URL
ArgumentTypeDescription
allowedOrigins?unknown
creator?unknown
input?stringA video's URL. The server must be publicly routable and support `HTTP HEAD` r...
meta?unknown
name?stringA video's name. Used for legacy compatibility.
requireSignedURLs?unknown
scheduledDeletion?unknown
thumbnailTimestampPct?unknown
url?stringA video's URL. The server must be publicly routable and support `HTTP HEAD` r...
watermark?unknown
fn create_stream_videos_upload_videos_via_direct_upload_ur_ls(allowedOrigins?: unknown, creator?: unknown, expiry?: string, maxDurationSeconds: unknown, meta?: unknown, requireSignedURLs?: unknown, scheduledDeletion?: unknown, thumbnailTimestampPct?: unknown, watermark?: unknown)
Upload videos via direct upload URLs
ArgumentTypeDescription
allowedOrigins?unknown
creator?unknown
expiry?stringThe date and time after upload when videos will not be accepted.
maxDurationSecondsunknown
meta?unknown
requireSignedURLs?unknown
scheduledDeletion?unknown
thumbnailTimestampPct?unknown
watermark?unknown
fn list_signing_keys()
List signing keys
fn create_signing_keys()
Create signing keys
fn delete_signing_keys(identifier: string)
Delete signing keys
ArgumentTypeDescription
identifierstring
fn list_live_inputs(include_counts?: string)
List live inputs
ArgumentTypeDescription
include_counts?string
fn create_a_live_input(defaultCreator?: unknown, deleteRecordingAfterDays?: unknown, enabled?: unknown, meta?: unknown, preferLowLatency?: unknown, recording?: unknown)
Create a live input
ArgumentTypeDescription
defaultCreator?unknown
deleteRecordingAfterDays?unknown
enabled?unknown
meta?unknown
preferLowLatency?unknown
recording?unknown
fn get_stream_live_inputs_retrieve_a_live_input(live_input_identifier: string)
Retrieve a live input
ArgumentTypeDescription
live_input_identifierstring
fn update_a_live_input(live_input_identifier: string, defaultCreator?: unknown, deleteRecordingAfterDays?: unknown, enabled?: unknown, meta?: unknown, preferLowLatency?: unknown, recording?: unknown)
Update a live input
ArgumentTypeDescription
live_input_identifierstring
defaultCreator?unknown
deleteRecordingAfterDays?unknown
enabled?unknown
meta?unknown
preferLowLatency?unknown
recording?unknown
fn delete_a_live_input(live_input_identifier: string)
Delete a live input
ArgumentTypeDescription
live_input_identifierstring
fn stream_live_inputs_disable_a_live_input(live_input_identifier: string)
Disable a live input
ArgumentTypeDescription
live_input_identifierstring
fn stream_live_inputs_enable_a_live_input(live_input_identifier: string)
Enable a live input
ArgumentTypeDescription
live_input_identifierstring
fn list_all_outputs_associated_with_a_specified_live_input(live_input_identifier: string)
List all outputs associated with a specified live input
ArgumentTypeDescription
live_input_identifierstring
fn create_a_new_output_connected_to_a_live_input(live_input_identifier: string, enabled?: unknown, streamKey: unknown, url: unknown)
Create a new output, connected to a live input
ArgumentTypeDescription
live_input_identifierstring
enabled?unknown
streamKeyunknownSecret: pass a vault.get expression, never a literal value.
urlunknownSecret: pass a vault.get expression, never a literal value.
fn update_an_output(output_identifier: string, live_input_identifier: string, enabled: unknown)
Update an output
ArgumentTypeDescription
output_identifierstring
live_input_identifierstring
enabledunknown
fn delete_an_output(output_identifier: string, live_input_identifier: string)
Delete an output
ArgumentTypeDescription
output_identifierstring
live_input_identifierstring
fn stream_live_inputs_rotate_keys_for_a_live_input(live_input_identifier: string)
Rotate keys for a live input
ArgumentTypeDescription
live_input_identifierstring
fn get_stream_videos_storage_usage(creator?: string)
Storage use
ArgumentTypeDescription
creator?string
fn get_account_stream_usage()
Get account Stream usage
fn list_watermark_profiles()
List watermark profiles
fn create_watermark_profiles_via_basic_upload(name?: unknown, opacity?: unknown, padding?: unknown, position?: unknown, scale?: unknown, url?: string)
Create watermark profiles via basic upload
ArgumentTypeDescription
name?unknown
opacity?unknown
padding?unknown
position?unknown
scale?unknown
url?stringURL of the watermark image to copy.
fn get_stream_watermark_profile_watermark_profile_details(identifier: string)
Watermark profile details
ArgumentTypeDescription
identifierstring
fn delete_watermark_profiles(identifier: string)
Delete watermark profiles
ArgumentTypeDescription
identifierstring
fn get_stream_webhook_view_webhooks()
View webhooks
fn create_webhooks(notificationUrl?: unknown, notification_url?: string)
Create webhooks
ArgumentTypeDescription
notificationUrl?unknown
notification_url?stringThe URL where webhooks will be sent.
fn delete_webhooks()
Delete webhooks
fn get_stream_videos_retrieve_video_details(identifier: string)
Retrieve video details
ArgumentTypeDescription
identifierstring
fn update_video_details(identifier: string, allowedOrigins?: unknown, creator?: unknown, maxDurationSeconds?: unknown, meta?: unknown, publicDetails?: object, requireSignedURLs?: unknown, scheduledDeletion?: unknown, thumbnailTimestampPct?: unknown, uid?: string, uploadExpiry?: unknown)
Edit video details
ArgumentTypeDescription
identifierstring
allowedOrigins?unknown
creator?unknown
maxDurationSeconds?unknown
meta?unknown
publicDetails?objectPublic details for the video including title, share link, channel link, and l...
requireSignedURLs?unknown
scheduledDeletion?unknown
thumbnailTimestampPct?unknown
uid?stringThe unique identifier for the video. Can be used to verify the video being up...
uploadExpiry?unknown
fn delete_video(identifier: string)
Delete video
ArgumentTypeDescription
identifierstring
fn list_audio_tracks(identifier: string)
List additional audio tracks on a video
ArgumentTypeDescription
identifierstring
fn create_add_audio_track(identifier: string, label: unknown, url?: string)
Add audio tracks to a video
ArgumentTypeDescription
identifierstring
labelunknown
url?stringAn audio track URL. The server must be publicly routable and support `HTTP HE...
fn update_edit_audio_tracks(identifier: string, audio_identifier: string, default?: unknown, label?: unknown)
Edit additional audio tracks on a video
ArgumentTypeDescription
identifierstring
audio_identifierstring
default?unknown
label?unknown
fn delete_audio_tracks(identifier: string, audio_identifier: string)
Delete additional audio tracks on a video
ArgumentTypeDescription
identifierstring
audio_identifierstring
fn list_captions_or_subtitles(identifier: string)
List captions or subtitles
ArgumentTypeDescription
identifierstring
fn get_caption_or_subtitle_for_language(language: string, identifier: string)
List captions or subtitles for a provided language
ArgumentTypeDescription
languagestring
identifierstring
fn delete_captions_or_subtitles(language: string, identifier: string)
Delete captions or subtitles
ArgumentTypeDescription
languagestring
identifierstring
fn stream_subtitles_captions_generate_caption_or_subtitle_for_language(language: string, identifier: string)
Generate captions or subtitles for a provided language via AI
ArgumentTypeDescription
languagestring
identifierstring
fn list_downloads(identifier: string)
List downloads
ArgumentTypeDescription
identifierstring
fn create_downloads(identifier: string)
Create downloads
ArgumentTypeDescription
identifierstring
fn delete_downloads(identifier: string)
Delete downloads
ArgumentTypeDescription
identifierstring
fn create_type_specific_downloads(identifier: string, download_type: string)
Create download
ArgumentTypeDescription
identifierstring
download_typestring
fn delete_type_specific_downloads(identifier: string, download_type: string)
Delete download
ArgumentTypeDescription
identifierstring
download_typestring
fn create_signed_url_tokens_for_videos(identifier: string, accessRules?: array, downloadable?: boolean, exp?: number, flags?: object, nbf?: number, pem?: string)
Create signed URL tokens for videos
ArgumentTypeDescription
identifierstring
accessRules?arrayThe optional list of access rule constraints on the token. Access can be bloc...
downloadable?booleanThe optional boolean value that enables using signed tokens to access MP4 dow...
exp?numberThe optional unix epoch timestamp that specficies the time after a token is n...
flags?objectOptional flags for the signed token.
nbf?numberThe optional unix epoch timestamp that specifies the time before a the token ...
pem?stringThe optional base64 encoded private key in PEM format associated with a Strea... Secret: pass a vault.get expression, never a literal value.

Resources

videos(infinite)— List videos
stream_videos_initiate_video_uploads_using_tus(infinite)— Initiate video uploads using TUS
stream_video_clipping_clip_videos_given_a_start_and_end_time(infinite)— Clip videos given a start and end time
stream_videos_upload_videos_from_a_url(infinite)— Upload videos from a URL
stream_videos_upload_videos_via_direct_upload_ur_ls(infinite)— Upload videos via direct upload URLs
signing_keys(infinite)— List signing keys
list_live_inputs(infinite)— List live inputs
a_live_input(infinite)— Create a live input
stream_live_inputs_retrieve_a_live_input(infinite)— Retrieve a live input
stream_live_inputs_disable_a_live_input(infinite)— Disable a live input
stream_live_inputs_enable_a_live_input(infinite)— Enable a live input
all_outputs_associated_with_a_specified_live_input(infinite)— List all outputs associated with a specified live input
a_new_output_connected_to_a_live_input(infinite)— Create a new output, connected to a live input
an_output(infinite)— Update an output
stream_live_inputs_rotate_keys_for_a_live_input(infinite)— Rotate keys for a live input
stream_videos_storage_usage(infinite)— Storage use
get_account_stream_usage(infinite)— Get account Stream usage
watermark_profiles(infinite)— List watermark profiles
watermark_profiles_via_basic_upload(infinite)— Create watermark profiles via basic upload
stream_watermark_profile_watermark_profile_details(infinite)— Watermark profile details
stream_webhook_view_webhooks(infinite)— View webhooks
webhooks(infinite)— Create webhooks
stream_videos_retrieve_video_details(infinite)— Retrieve video details
video_details(infinite)— Edit video details
list_audio_tracks(infinite)— List additional audio tracks on a video
add_audio_track(infinite)— Add audio tracks to a video
edit_audio_tracks(infinite)— Edit additional audio tracks on a video
captions_or_subtitles(infinite)— List captions or subtitles
caption_or_subtitle_for_language(infinite)— List captions or subtitles for a provided language
stream_subtitles_captions_generate_caption_or_subtitle_for_language(infinite)— Generate captions or subtitles for a provided language via AI
list_downloads(infinite)— List downloads
downloads(infinite)— Create downloads
type_specific_downloads(infinite)— Create download
signed_url_tokens_for_videos(infinite)— Create signed URL tokens for videos
04Previous Versions12
2026.10.14.1Apache-2.0(was none)

2026.10.14.1

Fixed: Methods that write a singleton resource failed on current swamp with Data name 'latest' is reserved for internal use.

Changed: Singleton get and action methods now write their data under create_downloads-current, create_signing_keys-current, create_type_specific_downloads-current, list_live_inputs-current, stream_live_inputs_disable_a_live_input-current, stream_live_inputs_enable_a_live_input-current, stream_live_inputs_rotate_keys_for_a_live_input-current, stream_subtitles_captions_generate_caption_or_subtitle_for_language-current, stream_videos_initiate_video_uploads_using_tus-current, stream_videos_storage_usage-current, stream_webhook_view_webhooks-current, update_video_details-current instead of latest. Anything that read data.latest("<model>", "latest") or queried name == "latest" must use the new name.

Upgrade note: Data previously stored under latest is not migrated; re-run the method to populate the new name. No attribute schemas changed.

Added: The manifest now declares license: Apache-2.0 (SPDX). The registry quality rubric scores a declared license separately from the bundled LICENSE.md.

2026.09.18.1

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.17.2

2026.09.17.2

No changes to this extension's methods. Regenerated to refresh the shared _lib/api.ts helper library after PR #427 review fixes to cfApiPaginatedCursor (used by r2, kv, durable-objects, and workers-ai, but emitted into every extension's api.ts since it's part of the shared template).

2026.09.15.1

2026.09.15.1

Changed: Bump zod 4.4.3 → 4.6.5

2026.08.28.2

Hardened codegen: instance names sanitized against path traversal; 429 rate-limit retry with Retry-After; string schema patterns emit regex validation; output schemas passthrough unknown fields; apiToken now optional and vault-wireable with CLOUDFLARE_API_TOKEN env fallback.

Added 1, removed 1 behaviors

2026.08.28.2

2026.08.28.2

Hardened codegen: instance names sanitized against path traversal; 429 rate-limit retry with Retry-After; string schema patterns emit regex validation; output schemas passthrough unknown fields; apiToken now optional and vault-wireable with CLOUDFLARE_API_TOKEN env fallback.

2026.08.28.1

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.2

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.2

2026.08.26.2

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.24.1

2026.08.24.1

Added: Output metadata attributes for observability.

  • durationMs: Method execution duration in milliseconds.
  • collectedBy: Extension name that produced the data.
  • fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.21.2

2026.08.21.2

Changed: Errors and validation now say what went wrong and where.

  • Cloudflare API failures (HTTP errors and success: false API responses) now name the HTTP method and path that was attempted, in addition to the original status/message. Previously the error read only Cloudflare API error: <message>, with no indication of which endpoint the method call was hitting — now it reads Cloudflare API request failed: GET /accounts/<account>/stream/<id>: <message>. This applies to every method on this model, since they all share the same request helper.
  • identifier, live_input_identifier, output_identifier, audio_identifier, download_type, and language are now validated as non-empty before any request is made. Passing an empty string previously sent a request to a malformed URL and produced a confusing 404 from Cloudflare; each now fails fast with a <field> must not be empty message.

Upgrade note: No method was added, removed, or renamed. Existing callers that always pass non-empty identifiers see no behavioral change beyond clearer error text.

2026.08.21.1

2026.08.21.1

Fixed: Regenerated with three cloudflare-codegen fixes: (1) discriminated-union request bodies with a sibling top-level discriminator property (e.g. gateway proxy_endpoints kind) now correctly build the body from the full oneOf variant instead of silently dropping it to undefined; (2) DELETE methods with a request body (e.g. r2 delete_objects bulk-delete-by-list) now send that body instead of ignoring it; (3) oneOf/anyOf request body variants that are $ref (e.g. r2 sippy config) are now resolved to their real schema instead of collapsing to z.unknown(). Same generator fix as workers-scripts in #352, now caught up for these 7 services.

Changed: update_stream_subtitles_captions_upload_captions_or_subtitles was removed — it is no longer present in the upstream Cloudflare API spec this extension is generated from.

Modified 1 behaviors

2026.07.27.1

2026.07.27.1

Fixed: Regenerated from scripts/cloudflare-codegen after two generator bugs were repaired (webframp/swamp-extensions#284).

  1. Methods referencing an undeclared path parameter did not compile. The generator derived a method's arguments schema and execute signature from the OpenAPI parameters list, but built the request URL from the path template. Where the Cloudflare spec omits a declaration for a {placeholder} — which it does in several places — the result was a method with arguments: z.object({}) and an unused _args parameter whose body still interpolated args.<name>. Those methods failed type checking and were uncallable even if they had compiled, because the argument was never declared. Path-template placeholders are now unioned into the declared parameters, so the schema, the signature, and the body agree.

  2. Generated tests could request a URL the mock server did not serve. Test arguments merged the request-body fixture over the path-parameter values, so a body property sharing a name with a path parameter (commonly id) substituted its own example value into the URL. The request then missed the mock and failed with Cloudflare API error: Not found. Path parameters now take precedence, matching what the generated model already does by excluding path-parameter names from the request body.

Upgrade note: No API surface change and no method was added or removed. If this extension type-checked and tested cleanly before, its behavior is unchanged and only the version moved. Extensions that previously failed deno check or deno task test now pass.

2026.07.19.1

2026.07.19.1

Added: Initial code-generated release of @webframp/cloudflare/stream with 47 methods covering the Cloudflare stream API surface.

05Stats
A
100 / 100
Downloads
33
Archive size
27.2 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
06Platforms
07Labels