GitHub Gists API: update a gist with base64-encoded content?

The docs don’t mention the structure of the files object:

From lurking on internet I found that it’s an object of format {"my_filename.txt" : {"filename": "my_new_filename.txt", "content": "my utf8 encoded string"}}. Can I use base64-encoded content to update my gists from GitHub API? (motivation: base64-encoding raw bytes (e.g. an image) may be easier than UTF8-encoding them)

There was a negative response in 2012, but maybe things have evolved since: github - Posting images to Gists via the HTTP API - Stack Overflow .

Thanks!

I am also having the same question and any help is appriciated on uploading image files to gist using API