Upload file (Gemini format)
/genai/upload/v1beta/filesUploads a file using Google Gemini API format.
This is a multipart upload with two parts:
- "metadata": JSON object containing file metadata
- "file": Binary file content
Note: Direct file content download is not supported by Gemini Files API. Use the file.uri field from the response to access uploaded files.
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:8080/genai/upload/v1beta/files" \ -F file="string"{
"file": {
"name": "string",
"displayName": "string",
"mimeType": "string",
"sizeBytes": "string",
"createTime": "2019-08-24T14:15:22Z",
"updateTime": "2019-08-24T14:15:22Z",
"expirationTime": "2019-08-24T14:15:22Z",
"sha256Hash": "string",
"uri": "string",
"state": "STATE_UNSPECIFIED",
"error": {
"code": 0,
"message": "string"
},
"videoMetadata": {
"videoDuration": "string"
}
}
}{
"error": {
"code": 0,
"message": "string",
"status": "string",
"details": [
{
"@type": "string",
"fieldViolations": [
{
"description": "string"
}
]
}
]
}
}{
"error": {
"code": 0,
"message": "string",
"status": "string",
"details": [
{
"@type": "string",
"fieldViolations": [
{
"description": "string"
}
]
}
]
}
}Stream generate content (Gemini format) POST
Streams content generation using Google Gemini API format. The model is specified in the URL path.
Change own password PUT
Allows any authenticated user to change their own password. Requires the current password for verification. All sessions are invalidated after password change.