Hacker News new | ask | show | jobs
by Samin100 1362 days ago
Great work! If anyone’s planning to use AI generated artwork in their projects, I’ve added an image search API to Lexica, similar to Unsplash. All the images are licensed CC0 and millions more are being added every few weeks.

Docs here: https://lexica.art/docs

4 comments

Been using Lexica quite a bit for prompt analysis, thanks for the work.

General browsing is heavily dominated by portraits though. I was wondering if it would be worth having a face detected flag on images so you could filter portraits.

That’s a really cool idea. Especially since that in particular doesn’t seem quite hard. Do you have any ideas in how you’d implement that?
Great work on Lexica.art, it's been indispensable for finding good prompts and combinations.

How much does it cost to host it? Feels like hosting 500GB of images and serving them can't be cheap.

Last month Lexica served a little over 1 billion images and the Cloudflare bill (I'm using R2 + workers) was a little over $5k. I've since gotten it down to a more reasonable amount after spending some time to re-encode the images to reduce our bandwidth usage significantly. If Lexica were running on AWS/S3 I imagine our first month's bill would be closer to $100k rather than $5k. This is only image serving, so not including costs to run the beefy CPU servers to run CLIP search, frontend, DB, backend, etc.
Why not go with a server or two or some VMs on Hetzner/Kimsufi/OVH/Netcup/BuyVM etc where they have very generous included transfer or even unmetered (BuyVM) ?

I get it that everyone wants to use the trendy newest tech (workers etc or whatever the latest is), but your bill could easily be 20% (or less) of the $5k kind of numbers you are mentioning.

I guess if those kind of numbers are just water under the bridge for you than you may as well go with the easier cloud setup/infra though.

Having used many different providers (though not all of the ones on your list), be very careful with suspiciously generous or unmetered anything. More often than not, you'll hit a soft limit where your performance will degrade and/or you'll get kicked for ToS violations.

Most apps never hit those limits, but once you get to multi-thousands/mo in cloud bills, there's benefits in pay-as-you-go billing where the provider is incentivized to let you use as much as you want to pay for.

> More often than not, you'll hit a soft limit where your performance will degrade and/or you'll get kicked for ToS violations.

Hetzner does have truly unmetered root servers, been using it myself for years. If you're doing Tor, Torrents or commercial CDN traffic, they might kick you out, but for other "normal" things, they seem to have no issues with handling it as they say they will.

Besides search and image listing, what other plans do you have with Lexica? Also, do you plan to open-source anything of it?
Weird 1billion 50k request ends up about 5k on the cloudfront pricing calculator. Do you have a bandwidth estimate? Idk how you got that 100k quote
What is the bandwidth like? I guess something in the order of a few 100 TB? Perhaps you can host this from a an "unmetered" server for $50 per month. Not sure how high your peak loads are though.
Thanks! Great work with Lexica.

We also released a free API https://devapi.krea.ai/ if anyone wants to check it out.

It will soon have endpoints with custom image generation features.

Amazing! Great to see more prompt APIs!
Amazing work, love Lexica! Thank you!