Canvas upload by URL: send lecture clips cut per module

Canvas can fetch a file from a public URL. Cut a recorded lecture into one clip per module with Sume's video trim, then hand Canvas each clip's URL.

5 min readSume
All posts

A 50 minute recorded lecture works better in a course as one short clip per module, and the file does not have to travel through your laptop: Canvas supports uploading a file from a public URL, and Sume returns each trimmed clip as a media.sume.com URL. Cut with video trim, then give Canvas the URL.

The Canvas side is from its developer documentation on file uploads (read 2026-10-02). Sume does not integrate with Canvas, does not call its API and does not know your course IDs. Whether Canvas can fetch a given Sume URL is something you must test, as explained below.

How does Canvas upload a file from a URL?

The developer docs describe two paths. The URL path has three steps: post a publicly accessible HTTP or HTTPS URL to Canvas with the file details; if the response includes an upload_url, post the upload_params (without the file itself) to that upload service; then monitor progress with the Progress API while Canvas clones the file in the background.

The docs name no maximum file size. They say the size parameter is recommended because it lets you find out about a quota problem before uploading. That means you want the clip's size known before the call, and Sume's trim result gives you the URL and duration, so measure the size when you fetch it.

How do I cut one clip per module?

Import the lecture with POST /v1/media-imports. Video trim then takes a start and one of end or duration; the source can be up to 1800 seconds, so a lecture longer than 30 minutes needs to be split first. Each clip's output can be up to 900 seconds and costs $0.02.

The default precision is exact, a frame-accurate re-encode, which is what you want for a module that must start on the first word. Choose keyframe only for speed, since it can start a GOP early.

curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: bio101-week3-module2" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/bio101-week3.mp4",
    "start": 612,
    "end": 1104
  }'

Will Canvas be able to fetch the Sume URL?

Canvas asks for a publicly accessible URL. Sume's docs call the trim output a new artf_ artifact with a video_url, and describe Sume media as media.sume.com URLs, but they do not promise that every URL is fetchable without credentials from every network. Before you automate, request the URL with plain curl -I from outside your Sume session and confirm a 200 and a video content type.

If the check fails, download the file and use Canvas's file-data upload path instead. That is a Canvas API route, outside what this post covers.

What about captions for the course?

Course video generally needs captions, and Sume can burn them in with video captions: $0.20 per job for clips up to 60 seconds under the current fixed estimate, with optional language. Burned-in captions are part of the pixels, so they cannot be switched off by a student and do not replace a separate caption track if your institution requires one. The guide on ADA Title II course captions covers that decision.

Track each job with Jobs and results; one clip is one job, so a 12 module course is 12 jobs and $0.24 in trim fees.

How do I name and track the clips?

Keep a small table that maps each module to its Sume job and clip URL. The trim result includes duration_seconds and actual_start_seconds, which let you confirm that the cut started where you intended, and the Idempotency-Key you chose, such as bio101-week3-module2, makes it easy to find the job again.

Re-running a module with a corrected range is a new job with a new key. Keep the old clip until the new one is checked and uploaded, because Canvas holds its own copy once the upload completes.

Test the whole path with one module before cutting twelve: trim, fetch the URL, upload to a sandbox course, and play it in Canvas.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume