Expand description
Thin reqwest wrapper around the studio API.
Every call goes through ApiClient::check, which:
- emits a structured
tracingevent on success (debug) and failure (warn) so operators can see what the worker is talking to without having to enable wire-level logging in reqwest (completealso logs the upload byte size before the request so the attempted payload size is visible even when it never finishes), and - turns non-2xx responses into an
anyhowerror tagged with the operation name so the existing log shipper messages stay legible.
Structs§
Functions§
- mime_
for_ ext - Map a binary output’s file extension to the MIME type sent as the
multipart
completeupload’sContent-Type. Single source of truth: every engine that emits aTaskResultbinary extension (synthetic image →png/webp, sd-cpp →webp, tts →wav, synthetic video →webp, thevideofeature →gif) routes through here, so a new extension can’t silently drift intoapplication/octet-streamand break the studio’s stored content-type.