New
  • #1 on OLMBench — AlphaDigit Max v2 scores 89.4%, ahead of Chandra & Mistral
  • AlphaDigit Max v2 & AlphaDigit Fast v2 are now available via the API — AlphaDigit Medium v2 is available on demand
Discover

Examples

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-fast", "type": "ocr" },
  { "model_slug": "alpha-digit-handwritten", "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": [],
  "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)

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"

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")}
    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("audio", new Blob([fs.readFileSync("/chemin/audio.wav")]), "audio.wav");
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) — retour des bounding boxes

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"

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",
    }
    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");
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());