# SarangAI > Unified AI gateway for developers: route 200+ AI models from one OpenAI-compatible > endpoint with a single API key and a credit wallet. Ships with an official CLI > (`sarangai-cli`), public web diagnostics tools, and per-token usage billing. SarangAI (sarangai.id) is an OpenAI-compatible AI gateway. Developers create an API key, point any OpenAI SDK, CLI, or IDE agent at the gateway base URL, and call frontier and open-weight models (Claude, GPT-4o, Gemini, DeepSeek, Llama, Qwen, Mistral, Grok, and more) while usage is billed in credits from a prepaid wallet. The gateway adds automatic retry with exponential backoff, OpenRouter fallback routing, equivalent-tier model cascades, and transparent per-model pricing. ## Docs - [Quickstart](https://sarangai.id/quickstart): make your first gateway call in minutes. - [Full API documentation](https://sarangai.id/docs): endpoints, SDK examples, IDE/CLI integration. - [Models & rates](https://sarangai.id/models): searchable catalog with live pricing. - [Authentication guide](https://sarangai.id/auth.md): Bearer API keys and CLI device-code flow. - [Full documentation for LLMs](https://sarangai.id/llms-full.txt): complete API and CLI reference in plain text. - [API catalog (JSON)](https://sarangai.id/.well-known/api-catalog.json): machine-readable endpoint list. ## CLI - [sarangai-cli on GitHub](https://github.com/sarangpenyamun/sarangai-cli): source and releases. - Install: `npm install -g sarangai-cli` - Login: `sarang login` (device-code authorization in the browser) - Run: `sarang run "Hello SarangAI!"` ## Gateway - Base URL: `https://sarangai.id/api/gateway/v1` - Chat completions: `POST https://sarangai.id/api/gateway/v1/chat/completions` - List models: `GET https://sarangai.id/api/gateway/v1/models` - Account balance: `GET https://sarangai.id/api/gateway/v1/balance` - Auth: `Authorization: Bearer sk-sarang-...` ## Blog - [How to Fix "HTTP 429 Too Many Requests" Error in Nginx](https://sarangai.id/blog/fix-http-429-nginx): Learn how to adjust rate limiting in Nginx to resolve HTTP 429 errors. This guide offers practical steps and examples to help developers con (2026-10-02) Answer: The "HTTP 429 Too Many Requests" error arises when a user exceeds a server's rate limits. Adjusting Nginx's rate limiting settings can resolve this, allowing for greater request handling without compromising server integrity or performance. - [How to Troubleshoot "ERR_CERT_COMMON_NAME_INVALID" in Nginx SSL Configurations](https://sarangai.id/blog/err-cert-common-name-invalid-nginx): Learn how to resolve the "ERR_CERT_COMMON_NAME_INVALID" error in Nginx with effective troubleshooting steps and best practices for SSL confi (2026-10-02) Answer: The "ERR_CERT_COMMON_NAME_INVALID" error occurs when a website’s SSL certificate’s common name does not match the requested domain. This can happen due to misconfigurations in Nginx settings, expired certificates, or incorrect domain bindings. Properly diagnosing the issue is essential for restoration of secure connections. - [How to Develop a Comprehensive Testing Strategy for AI Gateways in API-Driven Applications](https://sarangai.id/blog/testing-strategy-ai-gateways): Explore how to create a robust testing strategy for AI gateways that ensures the reliability and performance of API-driven applications. (2026-10-01) Answer: A comprehensive testing strategy for AI gateways in API-driven applications involves defining test objectives, selecting appropriate test types, automating tests where feasible, and continuously monitoring performance to ensure reliability and functionality in real-world scenarios. - [Is an AI Gateway Worth It for Small Projects? Cost, Latency, and Switching Trade-offs](https://sarangai.id/blog/ai-gateway-small-projects): Explore the value of AI gateways for small projects by evaluating their cost, latency, and trade-offs to help you make the right decision fo (2026-09-30) Answer: An AI gateway can streamline integration and management of AI services for small projects, but its cost, latency, and switching trade-offs require careful evaluation to ensure it aligns with your development needs and budget constraints. - [Enhancing API Security with AI-Powered Threat Detection and Prevention Techniques](https://sarangai.id/blog/enhancing-api-security-ai-threat-detection): Explore how AI-powered techniques improve API security by detecting and preventing threats effectively, safeguarding your applications and d (2026-09-29) - [Creating a Developer-Friendly Dashboard for Visualizing API Traffic and AI Gateway Metrics](https://sarangai.id/blog/creating-developer-friendly-dashboard-api-traffic-ai-gateway): Learn how to build an effective dashboard for monitoring API traffic and AI gateway metrics, enhancing developer experience and operational (2026-09-28) - [Optimizing Serverless Architectures Using AI Gateways for API Deployment and Management](https://sarangai.id/blog/optimizing-serverless-architectures-ai-gateways): Explore how AI gateways enhance serverless architectures, streamlining API deployment and management while reducing costs and improving perf (2026-09-27) - [Designing a Customizable AI Gateway for Simplified Cross-Platform API Integration in Modern Web Applications](https://sarangai.id/blog/customizable-ai-gateway-api-integration): Explore how to design an AI gateway that simplifies API integration across platforms, enhancing web application development. (2026-09-26) - [Implementing Real-Time Traffic Monitoring and Analytics in Your AI Gateway for Improved API Performance Insights](https://sarangai.id/blog/real-time-traffic-monitoring-ai-gateway): Explore how to integrate real-time traffic monitoring and analytics in your AI gateway to enhance API performance and efficiency. (2026-09-26) - [Utilizing AI Gateways to Enhance API Response Times Through Intelligent Caching Strategies](https://sarangai.id/blog/utilizing-ai-gateways-enhance-api-response-times): Explore how AI gateways improve API response times with intelligent caching strategies. Enhance your web applications' performance with acti (2026-09-25) ## Tools - [Web tools](https://sarangai.id/tools): free public diagnostics (DNS, SSL, headers, HTTP/2, PageSpeed, port scan, subdomain, RDAP, and more). ## Optional - [Blog index](https://sarangai.id/blog): all guides and release notes. - [Playground](https://sarangai.id/playground): try models in the browser. - [Benchmarks](https://sarangai.id/benchmarks): model quality comparisons. - [FAQ](https://sarangai.id/faq): common questions. - [Status](https://sarangai.id/status): gateway uptime and health. - [Contact](https://sarangai.id/contact): support and feedback.