First API call

The AlphaEdge API is a simple and intuitive REST API. Once you have obtained an API key, you can start using it immediately in your applications.

Cold start

On the first call or after a period of inactivity, the model may take about 600 ms to respond (cold start). Subsequent calls are faster.

Required configuration

PARAMETER VALUE
base_url https://api-endpoints.alphaedge-ai.com
api_key Request an API key on your dashboard

First API call: OCR (Alpha Digit Max or Medium)

Once you have your API key, you can try the OCR endpoint with multipart/form-data: the file field must be named exactly image; the model slug (alpha-digit-max or alpha-digit-medium) appears only in the URL path. Do not set Content-Type manually — curl -F, requests (files=…), or fetch(FormData) send multipart/form-data and the boundary.

bash
curl -X POST "https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr" \
  -H "X-API-Key: TA_CLE" \
  -F "image=@/chemin/vers/document.png"
python
import os
import requests

url = "https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr"
headers = {"X-API-Key": os.environ.get("ALPHAEDGE_API_KEY", "TA_CLE")}

with open("/chemin/vers/document.png", "rb") as f:
    files = {"image": ("document.png", f, "image/png")}
    r = requests.post(url, headers=headers, files=files, timeout=300)

print(r.status_code)
print(r.json())
javascript
import fs from "node:fs";

async function main() {
  const form = new FormData();
  form.append("image", new Blob([fs.readFileSync("/chemin/vers/document.png")]), "document.png");

  const res = await fetch("https://api-endpoints.alphaedge-ai.com/models/alpha-digit-max/ocr", {
    method: "POST",
    headers: { "X-API-Key": process.env.ALPHAEDGE_API_KEY || "TA_CLE" },
    body: form
  });

  console.log(res.status, await res.json());
}

main();

API response

The response is JSON: recognized text is primarily in the text. For accepted file extensions, confidence scores, and common errors (422), see the OCR.