Skip to main content
ProsperousTech
01 — BUILD: Product Engineering

Self-hosted video or a video API: choosing for a telehealth or consultation app

Apps for online consultations, such as physiotherapy, tutoring or advisory sessions, live or die by the call. If the video doesn't connect, nothing else in the product matters.

There are two broad ways to build it: pay a hosted video API per minute, or run your own WebRTC media servers. Both work. This guide sets out how to choose, and what self-hosting really involves.

1. The two options

A hosted video API gives you SDKs and a global network of media servers. You add calls to your app quickly and pay for usage, usually by participant minute.

Self-hosting means running open-source WebRTC media servers, typically a selective forwarding unit (SFU) and a TURN relay, on your own infrastructure. You pay for servers and bandwidth instead of minutes, and you own the operations.

2. When a video API usually wins

A hosted API is the sensible default when you need to launch quickly, when call volume is still small or unpredictable, or when users are spread across many regions.

  • You need calls working in weeks, not months
  • Usage is low or unknown, so per-minute pricing stays modest
  • Users are spread worldwide and need nearby media servers
  • No one on the team wants to operate real-time infrastructure

3. When self-hosting usually wins

Self-hosting starts to make sense when calls are central to the product and volume is steady, so per-minute charges become a large, growing line on the bill. It also helps when you need control over where media flows and how sessions are recorded.

  • Call volume is steady and per-minute costs dominate
  • You want media to stay on infrastructure you control
  • You need custom behaviour, such as session rules tied to bookings
  • The team can monitor and operate servers, or has a partner who does

4. What self-hosting really requires

The media server is the easy part. Most of the work is making calls connect on real networks and knowing when they don't.

  • A TURN relay, so calls connect from mobile data and strict office or hospital networks
  • TLS everywhere, including the signalling connection
  • Session access tied to the booking: only the right patient and practitioner can join, only in the slot
  • Monitoring of connection failures, relay usage and call quality
  • Automated tests that create a booking, join from two clients and check media flows
  • Capacity planning, because one server carries a limited number of concurrent calls

5. Privacy and health data

With either option, treat call access and records as sensitive. Decide where recordings are stored, who can access them and how long they are kept, and log who joined each session.

If you operate under health-data rules in your market, check them against the specific provider or setup you choose. Neither option is compliant or non-compliant by itself; the configuration and your processes decide that.

6. A practical path

Many teams start with a hosted API to validate the product, then move to self-hosted media once volume is steady and the cost is clear. Keep the video layer behind your own interface from the start, so switching later changes one component rather than the whole app.

Common questions

Is self-hosted video cheaper than a video API?

Often at steady, high call volume, because you pay for servers instead of minutes. At low or unpredictable volume a hosted API is usually cheaper once you count the engineering and operations time.

Why do video calls fail on some networks?

Strict firewalls and mobile networks block direct peer connections. A TURN relay forwards the media so the call still connects. Any self-hosted setup needs one.

Can I switch from a video API to self-hosted later?

Yes, if the app talks to video through your own interface rather than calling the provider's SDK everywhere. Plan for that boundary from the start.

Related service

Build products customers can rely on.

Product Engineering 

More guides

Have a project in mind?

Tell us what you need to build.

Share where the product is today and where it needs to go. We'll suggest a sensible first step.