Authentication
To use the services of the SipPulse AI platform, all requests must be authenticated using an API key. This guide explains how to configure and use API keys for authentication.
Obtaining your API Key
To generate an API key, follow the instructions in the API Keys section of the documentation.
Using the API Key
All requests to the SipPulse AI platform must include the API key in the request header. The header used is api-key
. Below are examples of how to include the API key in requests using different programming languages.
bash
curl -X 'GET' \
'https://api.sippulse.ai/v1/llms/models' \
-H 'Content-Type: application/json' \
-H 'api-key: $SIPPULSE_API_KEY'
python
import requests
url = "https://api.sippulse.ai/v1/llms/models"
headers = {
"Content-Type": "application/json",
"api-key": "SIPPULSE_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
javascript
const url = "https://api.sippulse.ai/v1/llms/models";
const headers = {
"Content-Type": "application/json",
"api-key": "SIPPULSE_API_KEY",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
API Key Security
- Confidentiality: Never share your API keys publicly. Avoid including them in browser or client-side code.
- Key Rotation: Periodically generate new API keys and replace the old ones to improve security.
- Revocation: If an API key is compromised, revoke it immediately through the API Keys section.