Simple strategy to launch free AI tools without buring your pocket

dialogist

New member
Free AI tools are a great SEO hack to get more traffic on your website, but my biggest concern always has been abuse of them.

Now the strategy I'm going to share isnt 100% bulletproof and folks can definitely get around it. But it has been working well so far.

I've implemented it for my Shopify App Idea Generator, which I've launched today.

Steps:
  1. First of all, explore Mistral in case your
    Code:
    output tokens
    >
    Code:
    input tokens
    1. Code:
      gpt-3.5-turbo-0125
      costs $0.5/1M for input & $1.5/1M for output
    2. Code:
      open-mixtral-8x7b
      costs 0.7$ / 1M tokens input & 0.7$ / 1M tokens for output
      1. one con is mixtral does not support tools right now, my idea generator is a rag tool so sadly couldnt use it in prod
    3. The average tokens per usage for my tool was 2k input & 1k output
      1. OpenAI cost comes out to be: $0.0025
      2. Mistral cost comes out: $0.0021
    4. More often than not, especially if you're building chat tools,
      Code:
      input >> output
      . So the lower input cost of 3.5 makes sense.
    5. This also motivated me to build my own gpt pricing calculator to do quick comparisons
  2. Now lets say you dont want to spend more than $50 per month on your free tool
    1. Lets assume you get 1k users in a month ( which is not an easy feat to achieve, remember, seo takes time)
      1. Only way to instantly get such traffic is to go viral on social media /product hunt etc, which ofcourse can be attempted
    2. That means per user you wouldnt want to spend more than 50/1000 = $0.05
    3. Execution cost for my tool is $0.0025
    4. So i can affort max $0.05/$0.0025 = 20 attempts per user in a month
  3. Implement IP based rate limiting
    1. I've deployed my backend on render, and it sends the ip of the client in `x-forwarded-for` header (altho this is pretty standard with any provider)
      1. Only way folks get around this easily is by switching networks or ip rotation, which again isnt that straightforward, but ofcourse can be hacked
    2. Now its upto you to limit the user once in 24 hours, 1 hour, or even 30 days for that matter. Ideally the user should be upfront aware about the executions they have in the x time frame so that they can optimise their prompts accordingly
    3. I usually prefer much tighter rate limits but use larger models so that the output is so damn good that folks start sharing the tools with each other and it increases virality
  4. Lastly, set the limits on your provider settings
    1. In the event you actually become viral, there is no one stopping from api abuse. In such scenarios OpenAI, Mistral and pretty much every provider allows you to set a cap at your usage budget. If that is crossed, the api stops working
    2. Yes this does break the tool, but it doesnt break your pocket atleast, you then buy time to figure out what to do.
Let me know what you folks think about this. I will definitely do a longer blog post version of this when I have some results & numbers in hand.

Cheers.
 

Similar threads

Back
Top