Installation and API key

The AlphaEdge API is a REST API you can call from any programming language. No SDK installation is required; you can use HTTP requests directly.

Prerequisites

To use the AlphaEdge API, you need:

  • An API key (get it from your dashboard)
  • An HTTP client (curl, Postman, or your preferred programming language)
  • An internet connection

Get your API key

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.

  1. Log in to your AlphaEdge dashboard
  2. Go to the API Keys section
  3. Generate a new API key or use an existing one
  4. Copy your API key (it will only be shown once)

API base URL

All requests must be sent to the following base URL:

text
https://api-endpoints.alphaedge-ai.com

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: YOUR_KEY (recommended legacy format)
  • Authorization: Bearer YOUR_KEY (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.

bash
# With X-API-Key (recommended)
curl https://api-endpoints.alphaedge-ai.com/account/me \
  -H "X-API-Key: YOUR_KEY"

# Equivalent: Authorization: Bearer
curl https://api-endpoints.alphaedge-ai.com/account/me \
  -H "Authorization: Bearer YOUR_KEY"
javascript
// With X-API-Key
const response = await fetch('https://api-endpoints.alphaedge-ai.com/account/me', {
  headers: { 'X-API-Key': 'YOUR_KEY' }
});

// Equivalent: Authorization: Bearer
const response2 = await fetch('https://api-endpoints.alphaedge-ai.com/account/me', {
  headers: { 'Authorization': 'Bearer YOUR_KEY' }
});
python
import requests

# With X-API-Key (recommended)
response = requests.get(
    'https://api-endpoints.alphaedge-ai.com/account/me',
    headers={'X-API-Key': 'YOUR_KEY'},
    timeout=30,
)

# Equivalent: Authorization: Bearer
response = requests.get(
    'https://api-endpoints.alphaedge-ai.com/account/me',
    headers={'Authorization': 'Bearer YOUR_KEY'},
    timeout=30,
)

Request format

Responses are in JSON. For endpoints whose body is a JSON object (chat, completions, etc.), send at least:

http
Content-Type: application/json
X-API-Key: YOUR_KEY

For OCR and transcription (multipart/form-data: file + optional fields), do not set Content-Type yourself, and especially not application/json. Use curl -F, requests with files= or fetch(FormData): the client sets multipart/form-data and the boundary automatically.

Test your connection

You can test your API connection with this simple request:

bash
curl https://api-endpoints.alphaedge-ai.com/models

This request returns the list of all available models.

Transparent headers & behaviors

The gateway automatically adds several headers to all responses. You don't need to configure anything on the client side, but it's useful to know them:

  • X-Request-ID — unique identifier of the request (useful for support). If you send this header yourself, its value is kept and returned as-is.
  • X-Process-Time-Ms — processing time on the gateway side, in milliseconds.
  • Retry-After — present only on 429 / 502 / 503 / 504 responses, indicates the recommended delay before a retry.
  • Content-Encoding: gzip + Vary: Accept-Encoding — compression enabled on sufficiently large responses when the client sends Accept-Encoding: gzip. Modern HTTP clients (curl, requests, fetch) handle decompression automatically.
  • Default security headers: X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: no-referrer, Cross-Origin-Resource-Policy: same-origin.

For sensitive endpoints (/account/*, /transcript), a Cache-Control: no-store is also present.

Security

Important: Never share your API key publicly. Do not commit it to your Git repositories. Use environment variables to store your API key.