MediaContent
HTTP API schema
One binary media result (audio or image). Exactly one of `data` (base64, inline) or `url` (a short-lived Port OS URL with its `expiresAt`) is present; the host rejects a result that carries both or neither. A plugin may return the vendor's fetchable `url` without `expiresAt`; the host always fetches it, republishes or inlines the bytes as the caller's `responseFormat` asks, and fills `byteLength`, so callers never see a vendor URL.
MediaContent fields
- mimeType
stringRequired The media type of the bytes.
Allowed values: audio/mpeg, audio/wav, audio/ogg, audio/flac, image/png, image/jpeg, image/webp.
- byteLength
integer Size of the decoded bytes. Always present on host responses.
minimum: 1
maximum: 26214400
- durationMs
integer Duration of audio in milliseconds, when known.
minimum: 0
- width
integer Image width in pixels, when known.
minimum: 1
- height
integer Image height in pixels, when known.
minimum: 1
- url
string Short-lived URL of the media (valid until `expiresAt`, at most 10 minutes).
- expiresAt
string When `url` stops working. Present with `url` on host responses.
format: "date-time"
- data
string Base64 encoded bytes, at most 10 MiB decoded.
format: "byte"
maxLength: 13981016