khoj-ai/khoj · warning · HTTPException
I'm glad you're enjoying interacting with me! You've unfortu
Error message
I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. You can subscribe to increase your usage limit via [your settings](https://app.khoj.dev/settings) or we can continue our conversation tomorrow?
What it means
A 429 HTTPException raised when an unsubscribed user exceeds the request quota AND an upgrade path exists (free limit is below the subscribed limit). Unlike the sibling error, the message points the user to subscription settings because paying would actually raise the cap.
Source
Thrown at src/khoj/routers/helpers.py:2149
)
raise HTTPException(
status_code=429,
detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. But let's chat more tomorrow?",
)
if not subscribed and count_requests >= self.requests:
if self.requests >= self.subscribed_requests:
logger.info(
f"Rate limit ({self.slug}): {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for user: {user}."
)
raise HTTPException(
status_code=429,
detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. But let's chat more tomorrow?",
)
logger.info(
f"Rate limit ({self.slug}): {count_requests}/{self.requests} requests not allowed in {self.window} seconds for user: {user}."
)
raise HTTPException(
status_code=429,
detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. You can subscribe to increase your usage limit via [your settings](https://app.khoj.dev/settings) or we can continue our conversation tomorrow?",
)
# Add the current request to the cache
UserRequests.objects.create(user=user, slug=self.slug)
async def check_websocket(self, websocket: WebSocket):
"""WebSocket-specific rate limiting method"""
# Rate limiting disabled if billing is disabled
if state.billing_enabled is False:
return
# Rate limiting is disabled if user unauthenticated.
if not websocket.scope.get("user") or not websocket.scope["user"].is_authenticated:
return
user: KhojUser = websocket.scope["user"].objectView on GitHub (pinned to ae229ca894)
Solutions
- Subscribe via https://app.khoj.dev/settings to raise the limit
- Wait until the window resets to continue on the free tier
- Throttle your client to stay under the free quota (add client-side limiting/backoff)
- If self-hosted and unintentional, review the limiter configuration for the endpoint
Defensive patterns
Strategy: retry
Try / catch
try:
resp = await client.post('/api/chat', json=body)
except HTTPStatusError as e:
if e.response.status_code == 429:
prompt_upgrade_or_wait() # free tier below subscribed cap
else:
raise Prevention
- Subscribe if sustained usage is needed
- Add client-side request budgeting per window
- Back off exponentially on 429 instead of retrying immediately
When it happens
Trigger: Sending more than `self.requests` chat requests within `self.window` seconds as an unsubscribed user, when the limiter's free quota is strictly lower than `subscribed_requests` (e.g. 5 free vs 100 subscribed).
Common situations: Running an automation/integration script against app.khoj.dev on a free account; multiple team members sharing one free account; evaluating the hosted product and hitting the trial quota mid-test.
Related errors
- {common_message_prefix} You can subscribe to increase your u
- {common_message_prefix} But let's chat more {next_window}?
- Those are way too many images for me! I can handle up to {se
- I'm glad you're enjoying interacting with me! You've unfortu
- Those images are way too large for me! I can handle up to {s
AI-assisted analysis of khoj-ai/khoj@ae229ca894 (2026-08-27).
Data as JSON: /api/errors/e7b1ff71227567bf.
Report an issue: GitHub.