Obtaining Your API Subscription Key
- Sign Up: Create an account on the Sarvam Dashboard
- Generate Key: When you sign up, an API key is generated for your account and shown in the dashboard.
- Organisation Key Management: Create Organisational level keys is not currently supported and will be available soon.
Using the API Subscription Key
To authenticate your requests, include theAPI-Subscription-Key in the headers of your HTTP requests. Here’s an example using Python and the requests library:
Best Practices for API Key Management
- Keep Your Key Secret: Never expose your API key in public repositories or client-side code.
- Use Environment Variables: Store your API key in environment variables rather than hardcoding it in your application.
- Monitor Usage: Regularly check your API usage on the Sarvam dashboard. You should be able to see the credits utilised & remaining