Unays platform
Build reliable services on Unays.
Connect approved AI, curriculum, identity, webhook-registration, and UnaysNET workflows through one versioned interface. Public documentation describes the contract; credentials and customer data remain private.
Quickstart
Create a named key from your Unays account, store it on your server, and send it in an authorization header. Never expose keys in browser source, application bundles, screenshots, or public repositories.
curl https://unays.net/ai/api/v1/platforms \
-H "Authorization: Bearer $UNAYS_API_KEY" \
-H "Accept: application/json"AI API
Submit one moderated prompt and receive a structured answer. Supported modes are general, educational, research, coder, and business.
- POST
/ai/api/v1/ai/chat- Generate a response
{
"prompt": "Explain this idea clearly.",
"mode": "general"
}Education API
Read the published curriculum structure through an authenticated server request.
- GET
/ai/api/v1/education/catalog- Classes, subjects, terms, and unit totals
Authentication API
A developer key can verify a separate first-party Unays user session without receiving the user's password.
- POST
/ai/api/v1/auth/verify- Validate
X-Unays-User-Token
Session tokens are private credentials. Send them only between first-party services over HTTPS.
UnaysNET API
UnaysNET uses developer keys to authorize local monitoring agents. Remote server-side scanning and subnet discovery are disabled.
- POST
/ai/api/v1/iot/authorize- Authorize a developer key for an agent
- GET
https://iot.unays.net/api/health- Public service health
Authentication and API keys
Sign in with your Unays account to create up to five named keys. A secret is shown only once; the service stores a one-way SHA-256 digest. Revoke keys that are lost, exposed, or no longer used.
Developer key management
Sign in to view or manage your API keys.
Webhook registrations
Register, list, and remove up to five public HTTPS destinations with /ai/api/v1/webhooks. Registration is active. Automatic event delivery and request signing are not yet enabled and will be announced here before use.
- EVENT
ai.response.completed- Reserved event name
- EVENT
education.progress.updated- Reserved event name
- EVENT
iot.alert.created- Reserved event name
Request examples
const response = await fetch('https://unays.net/ai/api/v1/ai/chat', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNAYS_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ prompt: 'Hello', mode: 'general' })
});
if (!response.ok) throw new Error(`Unays API ${response.status}`);
const data = await response.json();import os
import requests
response = requests.post(
'https://unays.net/ai/api/v1/ai/chat',
headers={'Authorization': f"Bearer {os.environ['UNAYS_API_KEY']}"},
json={'prompt': 'Hello', 'mode': 'general'},
timeout=90,
)
response.raise_for_status()
print(response.json())curl -X POST https://unays.net/ai/api/v1/ai/chat \
-H "Authorization: Bearer $UNAYS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Hello","mode":"general"}'Rate limits
All authenticated v1 endpoints currently share a per-key rate window. Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
| API group | Current limit | Response |
|---|---|---|
| Authenticated v1 APIs | 30 requests per minute per key | 429 until the window resets |
/v1/status | Public health request | Current API state |
API status
View current health and recent observed availability on the status page.
Open platform statusChangelog
- Versioned developer API
Added key management, AI, curriculum, identity verification, UnaysNET authorization, webhook registration, and public status endpoints.
