<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: S M Tahosin</title>
    <description>The latest articles on DEV Community by S M Tahosin (@tahosin).</description>
    <link>https://dev.to/tahosin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3886453%2Fc873323b-e797-47c0-b440-744cf18b17fe.png</url>
      <title>DEV Community: S M Tahosin</title>
      <link>https://dev.to/tahosin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tahosin"/>
    <language>en</language>
    <item>
      <title>How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed)</title>
      <dc:creator>S M Tahosin</dc:creator>
      <pubDate>Sat, 18 Apr 2026 18:53:42 +0000</pubDate>
      <link>https://dev.to/tahosin/how-to-call-google-gemini-api-from-nextjs-free-tier-no-backend-needed-3dng</link>
      <guid>https://dev.to/tahosin/how-to-call-google-gemini-api-from-nextjs-free-tier-no-backend-needed-3dng</guid>
      <description>&lt;p&gt;Here's how I integrated Google Gemini's free API into a Next.js app - calling it directly from the client with zero backend cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Client-Side?
&lt;/h2&gt;

&lt;p&gt;I initially used a serverless function (API route) to call Gemini. But on Netlify's free tier, functions have a &lt;strong&gt;10-second timeout&lt;/strong&gt;. Gemini sometimes takes 5-8 seconds, and with cold starts, it was hitting 502 errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Call the Gemini API directly from the browser. Since I'm using the free tier API key (rate-limited by Google), there's no security concern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Get a Free Gemini API Key
&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href="https://aistudio.google.com/app/apikey" rel="noopener noreferrer"&gt;aistudio.google.com&lt;/a&gt;. Free tier gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;15 requests per minute&lt;/li&gt;
&lt;li&gt;1,500 requests per day&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Environment Variable
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;NEXT_PUBLIC_GEMINI_API_KEY&lt;/span&gt;=&lt;span class="n"&gt;your_key_here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Call the API
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s2"&gt;`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
      &lt;span class="na"&gt;generationConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;maxOutputTokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;candidates&lt;/span&gt;&lt;span class="p"&gt;?.[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;?.[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Static Export for Netlify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// next.config.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;export&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No serverless functions needed. Deploy with &lt;code&gt;netlify deploy --prod --dir out&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live Examples
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://maxai-writer-pro-tools.netlify.app" rel="noopener noreferrer"&gt;MaxAI Writer&lt;/a&gt; - 6 AI writing tools&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://promptcraft-ai-gen.netlify.app" rel="noopener noreferrer"&gt;PromptCraft AI&lt;/a&gt; - AI image prompt generator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Source: &lt;a href="https://github.com/x-tahosin/maxai-writer" rel="noopener noreferrer"&gt;github.com/x-tahosin/maxai-writer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions? Drop them below!&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>PromptCraft AI: Free Prompt Generator for Midjourney, DALL-E 3 &amp; Stable Diffusion</title>
      <dc:creator>S M Tahosin</dc:creator>
      <pubDate>Sat, 18 Apr 2026 18:47:15 +0000</pubDate>
      <link>https://dev.to/tahosin/promptcraft-ai-free-prompt-generator-for-midjourney-dall-e-3-stable-diffusion-29ac</link>
      <guid>https://dev.to/tahosin/promptcraft-ai-free-prompt-generator-for-midjourney-dall-e-3-stable-diffusion-29ac</guid>
      <description>&lt;p&gt;If you use Midjourney, DALL-E 3, Stable Diffusion, or Flux, you know the struggle: writing the perfect prompt.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;PromptCraft AI&lt;/strong&gt; to solve this. Describe your image idea in plain English, pick a style and mood, and get 3 platform-optimized prompts instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Describe your idea&lt;/strong&gt; — "A lone astronaut on Mars watching Earth rise"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick your platform&lt;/strong&gt; — Midjourney, DALL-E 3, Stable Diffusion, or Flux&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose a style&lt;/strong&gt; — Photorealistic, Anime, Oil Painting, Cinematic... (15+ options)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select a mood&lt;/strong&gt; — Dramatic, Peaceful, Mysterious, Vibrant... (10 options)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt; — Get 3 optimized prompts, copy-paste ready&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Platform-Specific Output
&lt;/h2&gt;

&lt;p&gt;Each platform has different prompt syntax:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Midjourney&lt;/strong&gt;: &lt;code&gt;/imagine&lt;/code&gt; format with &lt;code&gt;--ar&lt;/code&gt;, &lt;code&gt;--v&lt;/code&gt;, &lt;code&gt;--style&lt;/code&gt; params&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DALL-E 3&lt;/strong&gt;: Natural language with specific compositional details&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stable Diffusion&lt;/strong&gt;: Tag-based with &lt;code&gt;(emphasis:weight)&lt;/code&gt; and negative prompts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flux&lt;/strong&gt;: Descriptive language with technical parameters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PromptCraft formats everything correctly for each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Free
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://promptcraft-ai-gen.netlify.app" rel="noopener noreferrer"&gt;→ promptcraft-ai-gen.netlify.app&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;5 free generations. Pro ($3.99, one-time) for unlimited.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source Code
&lt;/h2&gt;

&lt;p&gt;Open source: &lt;a href="https://github.com/x-tahosin/promptcraft-ai" rel="noopener noreferrer"&gt;github.com/x-tahosin/promptcraft-ai&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What AI image platform do you use most? Let me know in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>creativity</category>
    </item>
    <item>
      <title>I Built 6 Free AI Writing Tools in One Weekend - No Signup Required</title>
      <dc:creator>S M Tahosin</dc:creator>
      <pubDate>Sat, 18 Apr 2026 18:47:12 +0000</pubDate>
      <link>https://dev.to/tahosin/i-built-6-free-ai-writing-tools-in-one-weekend-no-signup-required-15cg</link>
      <guid>https://dev.to/tahosin/i-built-6-free-ai-writing-tools-in-one-weekend-no-signup-required-15cg</guid>
      <description>&lt;p&gt;Are you tired of AI writing tools that require signup, credit cards, and monthly subscriptions just to generate a simple email?&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;MaxAI Writer&lt;/strong&gt; — 6 free AI writing tools that work instantly. No signup. No credit card. Just type and generate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. AI Resume Builder
&lt;/h3&gt;

&lt;p&gt;Paste your experience, target job title, and get an ATS-optimized resume in seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Cover Letter Generator
&lt;/h3&gt;

&lt;p&gt;Provide the job posting details, and get a tailored cover letter that matches the role.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Professional Email Writer
&lt;/h3&gt;

&lt;p&gt;Need to write a business email? Just describe the context and tone, done in 3 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. LinkedIn Bio Optimizer
&lt;/h3&gt;

&lt;p&gt;Stand out with an AI-crafted LinkedIn profile that highlights your strengths.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Product Description Writer
&lt;/h3&gt;

&lt;p&gt;Turn boring feature lists into compelling product copy that converts.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Blog Outline Generator
&lt;/h3&gt;

&lt;p&gt;Get structured, SEO-friendly blog outlines with headings and key points.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Free
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://maxai-writer-pro-tools.netlify.app" rel="noopener noreferrer"&gt;→ maxai-writer-pro-tools.netlify.app&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;5 free generations per tool. Pro upgrade ($4.99, one-time) for unlimited access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 16 + React 19&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;Google Gemini 2.0 Flash API&lt;/li&gt;
&lt;li&gt;Netlify (static + serverless)&lt;/li&gt;
&lt;li&gt;BNB crypto payments (BSC)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Source Code
&lt;/h2&gt;

&lt;p&gt;The project is open source: &lt;a href="https://github.com/x-tahosin/maxai-writer" rel="noopener noreferrer"&gt;github.com/x-tahosin/maxai-writer&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What AI writing tool would you want to see added next? Drop a comment!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
