╔══════════════════════════════════════════════════════════════════════════════╗ ║ ⚡ FREE GEMINI API — CLI HELP & DEVELOPER MANUAL ║ ║ HTTP/3 QUIC + Gemini Models + Arranger Engine + Multi-Account ║ ╚══════════════════════════════════════════════════════════════════════════════╝ BASE URL: http://127.0.0.1:8001 (WebSocket Cookie Bridge: ws://127.0.0.1:9226) CORE API ENDPOINTS: POST /v1/chat/completions OpenAI-compatible chat & streaming completions GET /v1/models List dynamic models (gemini-4-hydrogen [Default], gemini-4-neon, gemini-auto, etc.) POST /v1/models Register custom models & mode hashes at runtime POST /v1/models/discover Autonomous model & tier discovery across connected accounts GET /v1/workers Live worker pool metrics, active accounts & throughput GET /api/pool Alias for /v1/workers POST /chat Unified multimodal chat (Text, Images, MP4 screen recordings) POST /music AI Music generation via Gemini Lyria GET /history Query conversation history by conversation_id GET /history/search?q=... Full-text search across all stored conversations GET /stats Real-time SQLite database, Free vs Subscription tier breakdown GET /v1/analytics Machine-readable JSON analytics export GET /export/excel Download comprehensive Excel intelligence report (.xlsx) GET /health Cookie health, TTL inspector & extension status POST /reset Reset an active agent/user session GET /help Display this CLI developer manual MULTI-AGENT & TASK MODE HEADERS: X-Gemini-Mode: task Execute in Task Mode (sends [40] JSPB instead of [0]) X-Agent-ID: Sticky affinity binding (Keeps agent thread with same account) X-Session-ID: Custom session identifier X-Conversation-ID: Gemini server-side thread continuation BUILT-IN TOOLS & CAPABILITIES: * Gemini 4 Hydrogen (Everyday help flagship, 100% Free) * Gemini 4 Neon & Thinking (Deeper analysis with High=2, Medium=4, Low=1) * Chat vs Task Mode Dynamic segment switching (Chat: [0], Task: [40]) * Arranger Engine Native OpenAI Tool / Function calling & Output Sanitizer * Multi-Account Queue Auto load balancing across 1 to 100+ accounts with circuit breaker * HTTP/3 QUIC & TLS Chrome 152 JA4 fingerprint simulation with 0-RTT resumption * Multimodal Vision Supports PNG, JPG, WebP, GIF, and MP4 video uploads * Gemini Music Gen Generates AI instrumental and vocal audio tracks * Dual Analytics Export Automated SQLite WAL persistence + JSON & Excel reports SAMPLE USAGE: # 1. Quick Chat Completion (Default Model: gemini-4-hydrogen): curl -s -X POST http://127.0.0.1:8001/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model": "gemini-4-hydrogen", "messages": [{"role": "user", "content": "Explain quantum computing in 1 line."}]}' # 2. Deeper Analysis with Deep Thinking (Gemini 4 Neon High): curl -s -X POST http://127.0.0.1:8001/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model": "neon-high", "messages": [{"role": "user", "content": "Solve this logic puzzle with full step-by-step thinking."}]}' # 3. Agentic Task Execution (Task Mode): curl -s -X POST http://127.0.0.1:8001/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-Gemini-Mode: task" \ -d '{"model": "hydrogen-task", "messages": [{"role": "user", "content": "Create a multi-step checklist for database migration."}]}' # 3. Multi-Agent Sticky Affinity: curl -s -X POST http://127.0.0.1:8001/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-Agent-ID: Agent-Alpha" \ -d '{"model": "gemini-3.8-flash", "messages": [{"role": "user", "content": "Analyze competitor ads."}]}' # 3. Streaming Chat (SSE): curl -N -X POST http://127.0.0.1:8001/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model": "gemini-3.8-flash", "messages": [{"role": "user", "content": "Write a poem."}], "stream": true}' # 4. Check Cluster & Worker Pool Status: curl -s http://127.0.0.1:8001/v1/workers # 5. Generate AI Music (Gemini Lyria): curl -s -X POST http://127.0.0.1:8001/music \ -H "Content-Type: application/json" \ -d '{"prompt": "Upbeat futuristic synthwave beat with 80s bassline"}' # 6. Multimodal Vision / Local Image Analysis: curl -s -X POST http://127.0.0.1:8001/chat \ -H "Content-Type: application/json" \ -d '{"prompt": "Analyze this screenshot", "ref_image_path": "/path/to/screenshot.png"}' # 7. Search Past Conversations (SQLite): curl -s "http://127.0.0.1:8001/history/search?q=quantum" # 8. Download Excel Analytics Report: curl -s http://127.0.0.1:8001/export/excel -o analytics_report.xlsx CLI COMMANDS & MODES: ./goapi Start the API server daemon (Port 8001 & WS 9226) ./goapi --help Display this CLI help manual ./goapi --stats Print instant SQLite database analytics in terminal ./goapi --export out.json Export database analytics to JSON file ./goapi --export out.xlsx Export database analytics to Excel spreadsheet ./goapi --mcp Start as an MCP (Model Context Protocol) stdio server Supported Tools: chat, generate_image, generate_video, generate_music, check_health, reset_session