SURDHAR AI / DEVELOPERS
One API. A simpler way to build.
Beta documentation for Surdhar AI's authenticated chat-completion endpoint. Availability is controlled by the administrator's private configuration. No guaranteed uptime, latency, or model access is promised during beta.
Verify your account before generating an API key.
Create and privately store the one-time secret in your dashboard.
Send requests server-to-server with a Bearer token.
Make your first request
Run this from your backend or terminal. Never put secret keys in frontend JavaScript.
curl https://surdhar.com/v1/chat.php \
-H "Authorization: Bearer YOUR_SURDHAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Hello Surdhar AI"}],"max_tokens":128}'Response shape
{
"id": "sur-ai-123",
"object": "chat.completion",
"model": "provider-model-id",
"choices": [{"index": 0, "message": {"role": "assistant", "content": "Hello!"}}],
"usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}
}This is an illustrative format, not a live request. Token usage is returned as reported by the upstream provider.
Errors & limits
| HTTP | Meaning |
|---|---|
| 400 / 413 | Invalid or oversized request |
| 401 | Missing, invalid, or revoked key |
| 405 | POST required |
| 429 | Daily quota reached or another request pending |
| 502 | Upstream model call failed |
| 503 | Inference disabled or provider not configured |
The beta API allows up to 20 text messages, up to 16 KB request body, and caps max output at 512 tokens. Request quotas depend on the administrator settings and may change.
Build responsibly
Store keys securely, revoke any leaked keys, handle errors and retries, and set provider spending caps. Paid billing and a public SLA are not available in this beta.
Open developer dashboard →