Skip to main content

Direct Connections

This feature may change or be removed in future releases.

Direct Connections is a feature that allows users to connect their Hrida.ai client directly to OpenAI-compatible API endpoints, bypassing the Hrida.ai backend for inference requests.

Overview​

In a standard deployment, Hrida.ai acts as a proxy: the browser sends the prompt to the Hrida.ai backend, which then forwards it to the LLM provider (Ollama, OpenAI, etc.).

With Direct Connections, the browser communicates directly with the API provider.

Benefits​

  • Privacy & Control: Users can use their own personal API keys without storing them on the Hrida.ai server (keys are stored in the browser's local storage).
  • Reduced Latency: Removes the "middleman" hop through the Hrida.ai backend, potentially speeding up response times.
  • Server Load Reduction: Offloads the network traffic and connection management from the Hrida.ai server to the individual client browsers.

Prerequisites​

  1. Admin Enablement: The administrator must enable this feature globally.
    • Admin Panel > Settings > Connections > Direct Connections: Toggle On.
    • Alternatively, set the environment variable: ENABLE_DIRECT_CONNECTIONS=true.
  2. CORS Configuration: Since the browser is making the request, the API provider must have Cross-Origin Resource Sharing (CORS) configured to allow requests from your Hrida.ai domain.
    • Note: Many strict providers (like official OpenAI) might block direct browser requests due to CORS policies. This feature is often best used with flexible providers or internal API gateways.
Security Recommendation: Provider Key Scope

Use least-privilege provider credentials for Direct Connections.

If your provider supports scoped keys, prefer inference-only keys for regular usage. Avoid using management/master keys for day-to-day user traffic.

User Configuration​

Once enabled by the admin, users can configure their own connections:

  1. Go to User Settings > Connections.
  2. Click + (Add Connection).
  3. Enter the Base URL (e.g., https://api.groq.com/openai/v1) and your API Key.
  4. Click Save.

The models from this direct connection will now appear in your model list, often indistinguishable from backend-provided models, but requests will flow directly from your machine to the provider.

Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.