HTTPS Outcalls Cost Calculator

Hi everybody,

I created a small tool to calculate the cost of HTTPS outcalls this weekend. You can either provide a URL and determine the size of the request and response (Request Simulation) or you can define the request and response size manually (Slider Calculator).

The Request Simulation will also show you the cost if you don’t set max_response_bytes and the max response size of 2MB will be assumed and charged. It clearly shows the importance of setting the max_response_bytes to an appropriate value if the response is small.

Here’s the tool: https://7joko-hiaaa-aaaal-ajz7a-cai.icp0.io/
and here’s the repo: GitHub - domwoe/HTTPS-Outcalls-Calculator: Calculates the cost for HTTPS Outcalls on the Internet Computer

Best,
Dominic

17 Likes

Besides the fact that I’m obviously biased because it runs on Juno (:blue_heart:), it’s a really cool tool!

When I implemented HTTP outcalls, I learned about their costs through trial and error. It’s great to be able to get a sense of what it will cost in advance. This and other upcoming calculators are, in my opinion, a great resource and a must for the developer community building projects.

Thanks, Dominic! :pray:

3 Likes

Awesome tool! One small feature request would be the ability to add a number of headers to the request.

Btw, I think pricing for https calls should be based on what is produced by the a transformation function that strips unwanted html tags (stuff like …).

Super useful tool, thanks Dominic!

Thanks a lot David. Although I’ve only scratched the surface of Juno with this little app it was a breeze working with it. The platform and cli are super thoughtful.

Thanks Giles. I allowed headers only for POST requests, but you’re right sometimes you need it also for GET requests. Added.

There are internal discussions about this (and about the need to set max_response_bytes and not just get refunded). The issue with paying only for the transformed response is that an attacker could request GBs of data and strip out all or most of it. But I think we’ll move in this direction with some safety guards in place.

Thanks Joseph!

2 Likes

Super useful for me too!

1 Like

really useful! tks man

1 Like