POST /models/{model_slug}/transcript

Audio slug: alpha-audio-v1 only. Multipart: required file field named audio (not file). Optional: enable_diarization, enable_postcorrect (form booleans). POST /models/{slug}/transcript returns HTTP 200 (TranscriptResponse) on success. The internal gateway_wall_ms field is excluded from the client JSON. Authentication: X-API-Key or Authorization: Bearer (equivalent).

POST /models/{model_slug}/transcript

Request body

The following parameters can be included in the request body:

Parameters

audio
file
Required

Audio file (multipart, field name: audio).

enable_diarization
boolean
Default value: false

Optional. Enables diarization.

enable_postcorrect
boolean
Default value: false

Optional. Linguistic post-correction of the ASR text: punctuation, capitalization, spelling and removal of repetitions/stutters, via a call to an external open source model hosted at Novita. Optimized for French; do not enable for languages other than French. If unavailable on the server side, the raw ASR text is returned with a 200 status (failsafe).

Successful response

The following fields are returned in a successful response:

Response fields

model_slug
string

Model slug (synchronous response).

text
string

Transcribed text, post-corrected if enable_postcorrect=true and the service is available.

inference_seconds
number

ASR time reported by the upstream service (in seconds).

enable_diarization
boolean

Echo of the diarization value actually applied.

audio_duration_seconds
number

Detected audio duration.

audio_filename
string null

Name of the audio file, or null.

Examples

Code examples for using this endpoint:

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
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
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());

Response

Sample API response:

json
HTTP 200 — TranscriptResponse (POST /transcript) :
{
  "model_slug": "alpha-audio-v1",
  "text": "…",
  "inference_seconds": 1.2,
  "enable_diarization": false,
  "audio_duration_seconds": 45.3,
  "audio_filename": "audio.wav"
}