Files
VoiceStudio/docs/api-activity.md

69 lines
3.3 KiB
Markdown

# API Activity
Open **More → API Activity** in the desktop sidebar to follow HTTP speech requests from
connected applications. The view updates every two seconds while open and shows
the request endpoint, engine or model when known, start time, elapsed time, and
HTTP result. Expand a row for its request ID, response size, and failure category.
You can pin API Activity from the More menu to keep it in the main sidebar.
## What appears
The activity list covers speech generation, transcription, and translation
requests through the OpenAI-compatible audio API; ElevenLabs-compatible
text-to-speech requests; and VoiceStudio's native generation requests.
Requests made before this backend session started are not available.
Health polls, settings reads, WebSocket sessions, and unrelated background-job
endpoints are not included in this speech-request list.
A request stays **Running** until its response finishes, including streamed
responses. The current stage can identify model loading, queueing, generation,
audio encoding, or streaming when the handler reports that stage. Engines do not
all expose percentage progress, so elapsed time continues to update instead.
Finished requests appear as **Completed**, **Failed**, or **Cancelled**. A client
disconnect can end a request without an HTTP result.
Use the status filters to narrow the list. **Pause updates** freezes the view;
it does not pause requests or stop the backend from tracking them. **Refresh**
fetches the latest snapshot. **Clear finished** removes finished rows while
preserving running requests.
## Access and retained data
API activity is available to the local desktop or an authenticated administrator.
The network-sharing PIN grants access to speech generation, but does not grant
access to this diagnostic view. An administrator connecting remotely must use
the backend's configured administrator credentials.
The backend keeps at most 200 recent finished requests and 128 running requests
in memory. Old finished rows are removed as the list fills. If the running-request
limit is reached, incoming API work can continue without an activity row; the
view reports how many requests are not shown. Restarting the backend clears the
history.
Rows contain bounded metadata only. Request text, uploaded or generated audio,
credentials, query strings, and remote addresses are not retained. Failure
details use categories and HTTP status codes rather than raw response bodies or
exception messages. The activity view does not retain audio for playback or
download.
## API clients
Tracked responses include an `X-VoiceStudio-Request-ID` header. Use that ID to
find the matching row in API Activity. The diagnostic endpoints are:
- `GET /system/api-activity`: read the current activity snapshot.
- `DELETE /system/api-activity`: clear finished requests and keep running ones.
These endpoints use the diagnostic administrator access rules. They are not
part of the OpenAI- or ElevenLabs-compatible APIs. See the
[local speech API guide](speech-platform.md) for speech client configuration.
## Preview
The production web build below uses illustrative requests from the browser test
fixture, rather than real request content.
![API Activity desktop layout](media/api-activity/desktop.png)
[Narrow-screen layout](media/api-activity/mobile.png)