Published on November 15, 2019 (over 4 years ago)

New Feature: Delivery Usage API (a.k.a. tracking usage for your next big idea)

Justin Sanford
By Justin Sanford5 min readProduct

Appease me while I tell you a story; maybe one of you can help me.

One night a few weeks ago, I woke up with a great idea for the next huge app. I know, you’ve heard this story, but stick with me for a minute. We all love pets, and we all also know cute pets are the secret to internet fame. However, while you have insta-famous pets and Aaron Rogers calling on a dog to help him sell car insurance on TV, it’s incredibly hard for you to share your best contribution to humanity with others. I’m not talking about your cats; we all love cats, but they have plenty of presence on the internet already. Instead, I’m talking about your pet ferret.

So I woke up and knew what I was going to do that weekend; it was high time for a service that allows new and old pet owners to share the glory of their fuzzy (or not fuzzy) friends, live. I searched around and stumbled upon Mux Video’s live streaming capability, which was perfectly suited for my needs: instantly available live streaming, automatic VOD recording of every live stream, all situated behind an easy-to-use API. I got to work, and by the end of the weekend I had a workable product. I mean, who wouldn’t love stumbling across content like this all day, every day:

Fast forward a few weeks, and my platform Aww.tv has really taken off. Like any reasonable Silicon Valley company, I had firmly placed profitability into the bucket of “future me problems.” However, as my platform took off, the costs grew, and started to become a real issue I needed to solve. To make things worse, I didn’t even know how much each of my users was costing me. I thought about a premium model, because my users were now making money due to sponsorships from pet food and toy companies, but without a way to understand who was causing me to incur costs, I was stuck. I can track how much people are creating content, but I have no way to know what becomes viral and is watched hundreds or thousands of times. So, now I’m out a significant amount of money, and have no way to recoup that cost. What should I do?

Clearly the above is all fabricated, since you might have recognized me as a Mux employee, not to mention this is on Mux’s blog. Aside from the made up premise, though, this is a problem that real Mux customers have faced and continue to face. Many of you have great ideas that gain significant traction, but video delivery isn’t free and the costs can add up. To make a viable business, you need to be able to charge your customers when they make you spend money.

We’ve listened, and we’re happy to announce a new feature that we think will be valuable. Our Delivery Usage API lets you break down your delivered minutes by each asset. Combined with our webhooks (which allow you to attribute ingest and storage costs on a user by user basis), this new API exposes the information that you need in order to understand how much each video is being watched. Linked with your CMS, you can create a complete picture of your costs, allowing you to decide on the business model that makes sense for your use case.

A few details about this API that are important:

  1. Due to the inherent delay in log aggregation (and particularly with CDNs), we have to delay the information in this API by 12 hours. We will work to bring this down, but in order to provide accurate information, we have to stick with this delay for now. It wouldn’t do for us to report a number that’s incorrect, would it?
  2. This API is designed to let you know the delivery of each asset. As such, assets that were not delivered at all during the window will not be included in the results.
  3. You can specify a timeframe in the API request to limit what data you get back. A quick note here: we designed Mux (as a system) to operate on arbitrary billing periods, and this API forces you to report on hourly boundaries. Due to this, your invoice may not match exactly what you can pull from this API. It will be very close (they pull from the same data, after all), but to make this usable and scalable, we had to implement some limits around timeframes that our billing system doesn’t have to respect.

This API is available to all Mux Video users, and we’re excited to see what you use it for. The initial purpose was for usage allocation, but I’m sure y’all will come up with other creative ways to use this information.

As always, feel free to reach out with any questions. In addition, sign up for an account and try out Mux Video for free ($20 of free credit included). We’re hard at work building APIs and products that help people build video applications, and we’re interested in any and all feedback that you have.

With much 💖
- Justin and the Mux Team

P.S. Yes, I'm a Cowboys fan

Written By

Justin Sanford

Justin Sanford – VP of Customer Experience and Solutions

Previously Solution Architect at Brightcove and Program Manager at Microsoft. Doesn't trust people named Matt.

Leave your wallet where it is

No credit card required to get started.