Security & Key Management
Best Practices
- Server-Side Only: Always call Neosantara APIs from your backend. If you must use it in a frontend, create a proxy endpoint on your server.
- Environment Variables: Use
.envfiles andprocess.env(Node) oros.getenv(Python) to store keys. - Key Rotation: Periodically rotate your API keys via the Neosantara Dashboard.
Observability & Debugging
Every request to Neosantara returns arequest_id in the response headers or body. Always log this ID alongside your application logs.
Batch & Parallel Requests
- Python (async) using
httpxto issue parallel requests
- Node.js (
Promise.all)
Retry & Fault Tolerance
- Python (
tenacity)
- JavaScript (retry wrapper)
Caching & Idempotency
- Simple in-memory cache
Streaming & Real-Time UX
- Example (Python)
- Example (Node.js)
Production Patterns & Best Practices
- Use a dedicated API client per environment (dev/stage/prod)
- Enable server-side token rotation and secure storage for API keys
- Centralize error handling and retry policies
- Log structured events for observability (
request_id, model, tokens used) - Rate limit awareness per endpoint and tier
API Reference
Dive into endpoint specifics and parameter details.
Rate Limits
Review quotas and throttling guidance.