To run a model (transcription, OCR, chat, etc.), you must use a valid API key. The GET /models call (catalog list) is public: no key is required to view the available identifiers.
Get your API key
- Log in to your AlphaEdge dashboard
- Go to the API Keys section
- Generate a new API key or use an existing one
- Copy your API key (it will only be shown once)
Use your API key
For inference requests, include the key in the X-API-Key header (except GET /models and GET /models/{slug} which are public):
Two header formats are accepted and equivalent:
X-API-Key: TA_CLE(recommended legacy format)Authorization: Bearer TA_CLE(compatible with common SDKs)
If both headers are sent, X-API-Key takes precedence. Without a valid key, the API returns 401 with: {"detail": "Clé API manquante : fournissez l’en-tête X-API-Key ou Authorization: Bearer <clé>."}
The examples below assume a JSON body. For OCR or transcription (multipart), do not send Content-Type: application/json or a hand-built boundary — see the OCR and Audio pages.
# Avec X-API-Key (recommandé)
curl https://api-endpoints.alphaedge-ai.com/account/me \
-H "X-API-Key: TA_CLE"
# Équivalent : Authorization: Bearer
curl https://api-endpoints.alphaedge-ai.com/account/me \
-H "Authorization: Bearer TA_CLE"
// Avec X-API-Key
const response = await fetch('https://api-endpoints.alphaedge-ai.com/account/me', {
headers: { 'X-API-Key': 'TA_CLE' }
});
// Équivalent : Authorization: Bearer
const response2 = await fetch('https://api-endpoints.alphaedge-ai.com/account/me', {
headers: { 'Authorization': 'Bearer TA_CLE' }
});
import requests
# Avec X-API-Key (recommandé)
response = requests.get(
'https://api-endpoints.alphaedge-ai.com/account/me',
headers={'X-API-Key': 'TA_CLE'},
timeout=30,
)
# Équivalent : Authorization: Bearer
response = requests.get(
'https://api-endpoints.alphaedge-ai.com/account/me',
headers={'Authorization': 'Bearer TA_CLE'},
timeout=30,
)
Security
Important: Never share your API key publicly. Do not commit it to your Git repositories. Use environment variables to store your API key.