MoonLight API reference
MoonLight 1 Preview API docs.
MoonLight paid API now uses checkout-issued access tokens. Website chat still uses the internal endpoint, while production API calls use the tokenized URL below.
POST
/api/ai/ask
Internal chat endpoint used by the website UI.
GET
/api/aiaccesstok/{token}/prompt/{prompt}
Paid API endpoint. Pay on Pricing, receive access token, then call this URL.
GET
/api/ai/status
Check model runtime, endpoint, and loading state.
GET
/api/health
Check backend and database connectivity.
Base URL
https://abdulhodiy-mzwax.hf.space
accessTokenstring
Token returned after successful payment.
promptpath or POST json
Prompt segment, for example {"salom"} or URL encoded text.
POST bodyjson
You can also POST prompt, message, or question fields.
Paid access
Pay on the Pricing page, copy your access token, then call /api/aiaccesstok/<token>/prompt/<prompt>. endpoint. API errors may be returned in English.
Request example
curl "https://z3wax.uz/api/aiaccesstok/$MOONLIGHT_ACCESS_TOKEN/prompt/salom"Response example
{
"success": true,
"answer": "MoonLight javobi...",
"reply": "MoonLight javobi...",
"token_usage": {
"estimated_tokens": 80,
"access": {
"remaining_tokens": 999920,
"status": "active"
}
}
}