How to create AI images generation API for free using CloudFlare workers?

  1. Visit CloudFlare Dashboard 
  2. Make sure to login and if you do not have an account, register then login
  3. from the left menu, click Compute then Workers

  4. Clink the create application button

  5. Click start with hello world

  6. Click deploy

  7. Click Add binding

  8. Select Worker AI and click the add button

  9. Click the edit code button

  10. Visit this link and copy the code https://github.com/saurav-z/free-image-generation-api/blob/main/worker.js

  11. Paste the copied code to your worker and deploy

  12. Visit the settings tab of your worker

  13. Under Variables and secrets tab click add

  14. Create a secret varabible with the name API_KEY and your desired value for the secret

  15. Visit your worker page and copy the URL from your browser

  16. Add the copied URL and your chosen value for the secret API key to the plugin settings page for it to use to generate AI images for free

Leave a Reply

Your email address will not be published. Required fields are marked *