JSON
One JSON shape — app export, CLI, and gateway API.
Overview
The local gateway at 127.0.0.1:1117 is OpenAI-compatible and authenticated with the Bearer key shown in the app. The speech endpoints return one shared JSON shape — identical to the desktop app's Export JSON and edgespeak-cli JSON output.
POST /v1/audio/transcriptions → {task:"transcribe", duration, language?, text, segments[], usage}
POST /v1/audio/alignments → {task:"align", duration, text, segments[], usage}
POST /v1/text/segmentations → {task:"segment", text, segments[]}
GET /v1/models → {object:"list", data[]}POST /v1/audio/transcriptions
Multipart upload. response_format=verbose_json plus timestamp_granularities[]=word returns word-level timing. The desktop app's Export JSON and edgespeak-cli transcribe produce exactly this response.
curl http://127.0.0.1:1117/v1/audio/transcriptions \
-H "Authorization: Bearer sk-edgespeak-..." \
-F file=@meeting.m4a \
-F model="lattice-2-flash" \
-F response_format=verbose_json \
-F "timestamp_granularities[]=word"
{
"task": "transcribe",
"duration": 19.69,
"language": "English",
"text": "EdgeSpeak AI is a high-performance engine ...",
"segments": [
{
"id": 0,
"start": 0.0,
"end": 6.44,
"text": "EdgeSpeak AI is a high-performance engine designed for ...",
"words": [
{ "word": "EdgeSpeak", "start": 0.22, "end": 0.64, "score": 0.991 }
]
}
],
"usage": { "type": "duration", "seconds": 19.69 }
}POST /v1/audio/alignments
Forced alignment: you provide the transcript, the engine returns word-level timing. Reference text goes in the text field, or text_path — an absolute file path the gateway reads locally. The response never carries a language key; score is a confidence in [0, 1].
curl http://127.0.0.1:1117/v1/audio/alignments \
-H "Authorization: Bearer sk-edgespeak-..." \
-F file=@meeting.m4a \
-F text="LattifAI is a high performance engine ..."
{
"task": "align",
"duration": 19.6909375,
"text": "LattifAI is a high performance engine ...",
"segments": [
{
"id": 0,
"start": 0.22,
"end": 19.52,
"text": "LattifAI is a high performance engine ...",
"words": [
{ "word": "LattifAI", "start": 0.22, "end": 1.04, "score": 0.8463 }
]
}
],
"usage": { "type": "duration", "seconds": 19.6909375 }
}POST /v1/text/segmentations
Semantic sentence segmentation over a JSON body: text for plain text, or segments[] with timing. Plain-text input yields sentences without start and end — speaker, start, and end appear only when the input carried them. Optional threshold (default 0.35), min_chars, max_chars.
curl http://127.0.0.1:1117/v1/text/segmentations \
-H "Authorization: Bearer sk-edgespeak-..." \
-H "Content-Type: application/json" \
-d '{"text": "LattifAI is a high-performance engine designed for the structuring of audio and video content assets. It runs entirely on local compute, ensuring your data security."}'
{
"task": "segment",
"text": "LattifAI is a high-performance engine ... It runs entirely on local compute ...",
"segments": [
{ "text": "LattifAI is a high-performance engine designed for the structuring of audio and video content assets." },
{ "text": "It runs entirely on local compute, ensuring your data security." }
]
}GET /v1/models
Lists available models with an x_edgespeak extension per entry: capabilities, local, and active_for. Model IDs are runtime values; read them from the response instead of hard-coding them.
curl http://127.0.0.1:1117/v1/models \
-H "Authorization: Bearer sk-edgespeak-..."
{
"object": "list",
"data": [
{
"id": "<active-transcription-model>",
"object": "model",
"created": 0,
"owned_by": "EdgeSpeak",
"x_edgespeak": { "capabilities": ["transcribe"], "local": true, "active_for": ["transcribe"] }
},
{
"id": "<alignment-model>",
"object": "model",
"created": 0,
"owned_by": "EdgeSpeak",
"x_edgespeak": { "capabilities": ["align"], "local": true, "active_for": [] }
},
{
"id": "<text-segmentation-model>",
"object": "model",
"created": 0,
"owned_by": "EdgeSpeak",
"x_edgespeak": { "capabilities": ["segment"], "local": true, "active_for": [] }
}
]
}Field semantics
All timing values are seconds. segments[] items carry {id, start, end, text, words?}; word entries are {word, start, end, score?} with score a confidence in [0, 1]. Word timing lives only under segments[].words — never at the top level. usage is always {"type": "duration", "seconds": …}. Optional keys are omitted when there is no data — never null. Key order is not guaranteed, so read values by key.