Binary Data and Files
Use the bytes type to handle binary data in your API
The bytes type allows you to handle binary data in both requests and responses.
Sending bytes
If your API needs to send a stream of bytes (i.e. typical for assets like audio, images and other files) then
you can use the bytes type in the Fern Definition to model this.
audio.yml
Receiving bytes
When handling binary data in responses, use type: file instead of type: bytes. The bytes type is only supported in requests.
On the other hand, if your API is returning a stream of bytes, then you can leverage the bytes type as a response.
textToSpeech.yml