---
title: "Upload file (Gemini format)"
method: POST
path: "/genai/upload/v1beta/files"
tags: ["GenAI Integration"]
---

# Upload file (Gemini format)

`POST /genai/upload/v1beta/files`

Uploads 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.

## Response `200`

Successful response

- object
  - `file` object
    - `name` string — File resource name (e.g., files/abc123)
    - `displayName` string
    - `mimeType` string
    - `sizeBytes` string — Size in bytes (returned as string by Gemini API)
    - `createTime` string, date-time
    - `updateTime` string, date-time
    - `expirationTime` string, date-time
    - `sha256Hash` string
    - `uri` string — URI for accessing the file content
    - `state` 'STATE_UNSPECIFIED' | 'PROCESSING' | 'ACTIVE' | 'FAILED'
    - `error` object
      - `code` integer
      - `message` string
    - `videoMetadata` object
      - `videoDuration` string

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
