Creates a File
.
HTTP request
- Upload URI, for media upload requests:
POST https://generativelanguage.googleapis.com/upload/v1beta/files
- Metadata URI, for metadata-only requests:
POST https://generativelanguage.googleapis.com/v1beta/files
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"file": {
object ( |
Fields | |
---|---|
file |
Optional. Metadata for the file to create. |
Response body
Response for media.upload
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"file": {
object ( |
Fields | |
---|---|
file |
Metadata for the created file. |