Minimal PHP cURL script for Gemini API: deprecated model names return 404 errors

chiba-labo · reddit · 2026-10-12

A developer shared a copy-paste-ready PHP cURL script for calling the Gemini API with the current gemini-3.6-flash model, noting that many existing tutorials reference deprecated model names like gemini-1.5-flash that now return 404 errors. The post includes the full minimal script (endpoint setup, JSON payload, response parsing) plus troubleshooting tips: use an active model name and enable extension=curl in php.ini. A longer guide covers file placement, hosting setup, and web app integration.

Original post →

More from Apps

Apps channel →