---
title: "Continue Gemini file upload"
method: POST
path: "/upload/v1beta/files/session/{sessionId}"
tags: ["Gemini Resources"]
---

# Continue Gemini file upload

`POST /upload/v1beta/files/session/{sessionId}`

## Request

- Base URL: `https://api.tokenlab.sh`
- URL: `https://api.tokenlab.sh/upload/v1beta/files/session/{sessionId}`
- Auth: none required

Sends bytes or commands to the exact URL returned by resumable start. The session in the URL authorizes this upload; an API key is not required. Keep the URL private. A missing or expired session returns 404; a session that can no longer be continued returns 410. A nonterminal chunk can return 308, so do not treat that response as a page redirect.

## Path parameters

- `sessionId` string, required

## Headers

- `X-Goog-Upload-Command` string
- `X-Goog-Upload-Offset` string

## Response `200`

Success

- object
  - `file` GeminiFileResource: A Gemini file in the current Workspace. Fields are returned when available.
    - `name` string: File resource name such as files/{fileId}.
    - `displayName` string: Human-readable file name.
    - `mimeType` string: Media MIME type.
    - `sizeBytes` string: File byte size as a decimal string.
    - `uri` string: File URI to use in Gemini content parts.
    - `state` string: Processing state reported by the service. Wait until the file is ready before generation.
    - `createTime` string, date-time
    - `updateTime` string, date-time
    - `expirationTime` string, date-time
    - `error` object

## Other responses

- `308`: Upload chunk accepted; more data or finalization is needed.
- `400`: Gemini-format resource error
- `401`: Gemini-format resource error
- `403`: Gemini-format resource error
- `404`: Gemini-format resource error
- `409`: Gemini-format resource error
- `410`: Gemini-format resource error
- `429`: Gemini-format resource error
- `502`: Gemini-format resource error
- `503`: Gemini-format resource error

---

[API](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway.md) · [All operations](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/revisions/3208bfbcda22?raw)
