Send content to owner of gpg public key, nested content symmetric encryption If I want to encrypt a text content file using a symmetric algorithm like AES,
is there a standard format gpg will expect, where it can detect a symmetric key (encrypted with recipient gpg public key RSA) in my output?  E.g. should the encrypted key be a fixed length field at the beginning of my output?  

I am not able to use a suite gpg tools or command line.  I am restricted to manually using a subset of cryptography APIs supported in a legacy system.

From reading up at e.g. 
 https://futureboy.us/pgp.html#Symmetric, 
 https://www.gnupg.org/gph/en/manual/x110.html, 
 https://tools.ietf.org/html/rfc4880 
I see that this approach seems to be in use. 

But I am struggling to find any reference that would help me manually construct an appropriately structured "package".
If you encrypt a text file with the GPG utility, it randomly chooses a symmetric key, encrypts the file using that key, then encrypts the symmetric key using an asymmetric algorithm, and embeds the encrypted symmetric key in the file. There is a format that GPG uses and expects, but it is not easy to work with.

There is an RFC that describes the OpenPGP file format. It's not fun reading, but with a lot of hex dumps and a lot of time with the GPG source, I did figure out the basics of a GPG-encrypted file.

I did take the openssh project and carve out the sftp piece to build a package that encrypts the files when it puts them on the remote server and decrypts them when it reads from the remote server. The format of the files is GPG-compatible, without using the GPG utility. You might find some useful code in there for generating GPG-readable files, mostly in the iron subdirectory. IronCoreLabs/ironssh GitHub project