Gemini Resources

Get Gemini file

Reads metadata for a Gemini file. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.

get/v1beta/files/{fileId}

Request

  • Base URL: https://api.tokenlab.sh
  • URL: https://api.tokenlab.sh/v1beta/files/{fileId}
  • Auth: one of:
    • HTTP bearer
    • API key in header x-goog-api-key

Path parameters

fileIdstring required

Suffix of the returned files/{fileId} name.

Query parameters

keystring

API key alternative to Bearer or x-goog-api-key.

Response

Success

namestring

File resource name such as files/{fileId}.

displayNamestring

Human-readable file name.

mimeTypestring

Media MIME type.

sizeBytesstring

File byte size as a decimal string.

uristring

File URI to use in Gemini content parts.

statestring

Processing state reported by the service. Wait until the file is ready before generation.

createTimestring date-time
updateTimestring date-time
expirationTimestring date-time
errorobject

Changes

No recorded changes to this operation across all 1 revision of this API.