Yo can create attachment from in-memory data using Mail.dll, there is no need to create a temporary file:
C#:
byte[] data = new byte[] {1, 2, 3};
MailBuilder builder = new MailBuilder();
MimeData att = builder.AddAttachment(data);
att.FileName = "report.pdf";
IMail email = builder.Create();
VB.NET:
Dim data As Byte() = New Byte() {1, 2, 3}
Dim builder As MailBuilder = New MailBuilder()
Dim att As MimeData = builder.AddAttachment(data)
att.FileName = "report.pdf"
Dim email As IMail = builder.Create()
Although it would be possible to use base64 encoded data you get from your REST API, I think you shouldn't do that.
The reason behind this is, that emails should respect line limits, which might or might not be respected by your API's clients when the encode data.
Decode Base64 you get from the API, and allow Mail.dll to encode it again.