Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript
1.4 KB
Raw Blame
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script>
      try {
        // Mirrors the ThemeProvider's resolution: 'system' (or nothing stored)
        // follows the OS preference. Keep in sync with src/theme.tsx.
        const theme = localStorage.getItem('theme')
        const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
        const dark = theme === 'dark' || (theme !== 'light' && prefersDark)
        if (dark) {
          document.documentElement.classList.add('dark')
        }
        document.documentElement.style.colorScheme = dark ? 'dark' : 'light'
        document.documentElement.dataset.themeChoice =
          theme === 'dark' || theme === 'light' ? theme : 'system'
        // Same idea for text direction; keep in sync with RTL_LOCALES in
        // src/i18n/locale-config.ts.
        const locale = localStorage.getItem('freellmapi.locale')
        if (locale && ['ar', 'he', 'fa', 'ur'].includes(locale)) {
          document.documentElement.dir = 'rtl'
        }
      } catch {
        // Keep the initial render working if localStorage is unavailable.
      }
    </script>
    <title>FreeLLMAPI · Unified LLM Router</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>