1) GET /status (public)
cURL
curl
curl -X GET "https://api-endpoints.alphaedge-ai.com/status"
Python
python
import requests
r = requests.get("https://api-endpoints.alphaedge-ai.com/status", timeout=30)
print(r.status_code, r.json())
TypeScript
typescript
const res = await fetch("https://api-endpoints.alphaedge-ai.com/status");
console.log(res.status, await res.json());
2) GET /models (catalogue public, sans clé API)
cURL
curl
curl -X GET "https://api-endpoints.alphaedge-ai.com/models"
Python
python
import requests
r = requests.get("https://api-endpoints.alphaedge-ai.com/models", timeout=30)
print(r.status_code, r.json())
TypeScript
typescript
const res = await fetch("https://api-endpoints.alphaedge-ai.com/models");
console.log(res.status, await res.json());
3) POST /models/{model_slug}/transcript (audio -> texte)
Paramètres multipart/form-data:
- audio (obligatoire)
- enable_diarization (optionnel)
- enable_postcorrect (optionnel)
Note : enable_postcorrect est désactivé temporairement sur la passerelle ; réactivation prévue sous peu.
Réponse synchrone text ou HTTP 202 avec status_url à poller ; texte final possible sous result.text.
Valeurs booléennes acceptées: 1/0, true/false, yes/no, on/off.
cURL
curl
curl -X POST "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript" \
-H "X-API-Key: TA_CLE" \
-F "audio=@/chemin/audio.wav" \
-F "enable_diarization=true"
Python
python
import requests
url = "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript"
headers = {"X-API-Key": "TA_CLE"}
with open("/chemin/audio.wav", "rb") as f:
files = {"audio": ("audio.wav", f, "audio/wav")}
data = {
"enable_diarization": "true",
}
r = requests.post(url, headers=headers, files=files, data=data, timeout=300)
print(r.status_code)
print(r.json())
TypeScript (Node.js)
typescript
import fs from "node:fs";
const form = new FormData();
form.append("audio", new Blob([fs.readFileSync("/chemin/audio.wav")]), "audio.wav");
form.append("enable_diarization", "true");
const res = await fetch("https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript", {
method: "POST",
headers: { "X-API-Key": "TA_CLE" },
body: form
});
console.log(res.status, await res.json());
4) POST /models/{model_slug}/ocr (image -> texte)
Paramètre multipart/form-data:
- image (obligatoire, fichier)
cURL
curl
curl -X POST "https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr" \
-H "X-API-Key: TA_CLE" \
-F "image=@/chemin/image.png"
Python
python
import requests
url = "https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr"
headers = {"X-API-Key": "TA_CLE"}
with open("/chemin/image.png", "rb") as f:
files = {"image": ("image.png", f, "image/png")}
r = requests.post(url, headers=headers, files=files, timeout=300)
print(r.status_code)
print(r.json())
TypeScript (Node.js)
typescript
import fs from "node:fs";
const form = new FormData();
form.append("image", new Blob([fs.readFileSync("/chemin/image.png")]), "image.png");
const res = await fetch("https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr", {
method: "POST",
headers: { "X-API-Key": "TA_CLE" },
body: form
});
console.log(res.status, await res.json());