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());
HTTP 200 response:
json
{
"status": "ok",
"response_ms": 0.02,
"version": "0.3.0",
"uptime_seconds": 367.89,
"checks": { "asr": true, "ocr": true }
}
2) GET /models (public catalog, no API key)
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());
HTTP 200 response — array of objects (no envelope):
json
[
{ "model_slug": "alpha-audio-v1", "type": "audio" },
{ "model_slug": "alpha-digit-max", "type": "ocr" },
{ "model_slug": "alpha-digit-medium", "type": "ocr" }
]
3) GET /models/{model_slug} (model details, public)
Returns the metadata of a model: exposed endpoints, name of the input multipart field, accepted boolean options, accepted file extensions and pricing.
curl
curl -X GET "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1"
HTTP 200 response (audio example):
json
{
"model_slug": "alpha-audio-v1",
"type": "audio",
"display_name": "AlphaAudio v1",
"version": "1.0",
"description": "ASR haute précision optimisé pour le français.",
"endpoints": [
"POST /models/alpha-audio-v1/transcript"
],
"input_field_name": "audio",
"optional_fields": ["enable_diarization", "enable_postcorrect"],
"accepted_extensions": ["mp3", "m4a", "wav", "flac", "ogg", "opus", "webm", "wma", "aiff", "aac", "aif"],
"pricing": {
"eur_per_hour": 0.15,
"billing_unit": "audio_duration_seconds",
"currency": "EUR"
}
}
If the slug does not exist: 404 {"detail": "Modèle introuvable."}
4) POST /models/{model_slug}/transcript (audio -> text)
multipart/form-data parameters:
- audio (required)
- enable_diarization (optional)
- enable_postcorrect (optional — linguistic post-correction via an external open-source model hosted at Novita, French only)
Synchronous HTTP 200 response with the transcribed text in the field text.
Accepted boolean values (case-insensitive): 1/0, true/false, yes/no, on/off. Any other value returns an explicit 422.
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());
5) POST /models/{model_slug}/ocr (image -> text)
Paramètres multipart/form-data :
image(obligatoire, fichier)pdf_password(optionnel)enable_bbox(optionnel) — bounding boxes, +0,25 € / 1 000 pagesenable_extraction(optionnel) — extraction structurée, +0,50 € / 1 000 pages seulement si des données sont trouvéesextraction_prompt(optionnel, requis si enable_extraction) — champs séparés par des virgules
Doc complète : POST /models/{model_slug}/ocr
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/facture.png" \
-F "enable_bbox=true" \
-F "enable_extraction=true" \
-F "extraction_prompt=immatriculation, propriétaire, montant TTC"
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/facture.png", "rb") as f:
files = {"image": ("facture.png", f, "image/png")}
data = {
"enable_bbox": "true",
"enable_extraction": "true",
"extraction_prompt": "immatriculation, propriétaire, montant TTC",
}
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("image", new Blob([fs.readFileSync("/chemin/facture.png")]), "facture.png");
form.append("enable_bbox", "true");
form.append("enable_extraction", "true");
form.append("extraction_prompt", "immatriculation, propriétaire, montant TTC");
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());