Dhruvs AI Gateway
Server-Side Prompts Active
Connect any *.dhruvs.host HTML app to world-class AI models using a single script tag.
🔒 Security Restriction
To prevent abuse, this gateway is strictly locked to domains ending in dhruvs.host. Attempting to run this script from any other domain will result in a use dhruvs.host domain error in your console, and the request will be blocked.
Quick Start
1. Control the AI's Personality
Create a prompt.txt file at the root of your HTML app. Our backend will automatically detect it and enforce your instructions securely.
prompt.txt
You are a helpful and sarcastic AI assistant. Think step-by-step. Keep your final answers brief.
2. Embed the Script
Add this script tag to your HTML file.
html
<script src="https://gateway.dhruvs.host/widget.js" defer></script>
3. Call the AI
Use the global window.dhruvs() function anywhere in your Javascript.
- Action: Always
"gateway-call" - Message: The user's prompt
- Model: The model ID (e.g.,
"alibaba/qwen3-max") - Show Thinking:
trueto show reasoning tokens,falseto hide them
javascript
async function runAI() {
const reply = await window.dhruvs(
"gateway-call",
"Explain quantum physics in one sentence.",
"alibaba/qwen3-max",
true // Enable reasoning tokens if supported by the model
);
console.log(reply);
}