Google Gemini · Schema

File

A file uploaded to the API.

AI AgentsArtificial IntelligenceCode GenerationEmbeddingsGenerative AIImage GenerationLLMMachine LearningMulti-ModalReal-TimeFoundation ModelsAgentsAudio UnderstandingBatch ProcessingDeep ResearchDocument UnderstandingFunction CallingStructured OutputText-to-SpeechVideo GenerationVideo Understanding

Properties

Name Type Description
updateTime string Output only. The timestamp of when the `File` was last updated.
displayName string Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: "Welcome Image"
source string Source of the File.
createTime string Output only. The timestamp of when the `File` was created.
expirationTime string Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire.
videoMetadata object Output only. Metadata for a video.
mimeType string Output only. MIME type of the file.
sizeBytes string Output only. Size of the file in bytes.
sha256Hash string Output only. SHA-256 hash of the uploaded bytes.
error object Output only. Error status if File processing failed.
state string Output only. Processing state of the File.
uri string Output only. The uri of the `File`.
downloadUri string Output only. The download uri of the `File`.
name string Immutable. Identifier. The `File` resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end w
View JSON Schema on GitHub

JSON Schema

google-gemini-file-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-gemini/json-schema/google-gemini-file-schema.json",
  "title": "File",
  "description": "A file uploaded to the API.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-gemini-files-api-openapi.yml#/components/schemas/File",
  "properties": {
    "updateTime": {
      "format": "google-datetime",
      "type": "string",
      "description": "Output only. The timestamp of when the `File` was last updated.",
      "readOnly": true
    },
    "displayName": {
      "description": "Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: \"Welcome Image\"",
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "Source of the File.",
      "enum": [
        "SOURCE_UNSPECIFIED",
        "UPLOADED",
        "GENERATED",
        "REGISTERED"
      ]
    },
    "createTime": {
      "readOnly": true,
      "format": "google-datetime",
      "description": "Output only. The timestamp of when the `File` was created.",
      "type": "string"
    },
    "expirationTime": {
      "type": "string",
      "format": "google-datetime",
      "readOnly": true,
      "description": "Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire."
    },
    "videoMetadata": {
      "$ref": "#/$defs/VideoFileMetadata",
      "description": "Output only. Metadata for a video."
    },
    "mimeType": {
      "description": "Output only. MIME type of the file.",
      "readOnly": true,
      "type": "string"
    },
    "sizeBytes": {
      "type": "string",
      "readOnly": true,
      "format": "int64",
      "description": "Output only. Size of the file in bytes."
    },
    "sha256Hash": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. SHA-256 hash of the uploaded bytes.",
      "format": "byte"
    },
    "error": {
      "$ref": "#/$defs/Status",
      "description": "Output only. Error status if File processing failed."
    },
    "state": {
      "description": "Output only. Processing state of the File.",
      "readOnly": true,
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "PROCESSING",
        "ACTIVE",
        "FAILED"
      ]
    },
    "uri": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. The uri of the `File`."
    },
    "downloadUri": {
      "description": "Output only. The download uri of the `File`.",
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Immutable. Identifier. The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456`"
    }
  },
  "type": "object",
  "$defs": {
    "Status": {
      "properties": {
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    },
    "VideoFileMetadata": {
      "properties": {
        "videoDuration": {
          "description": "Duration of the video.",
          "format": "google-duration",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Metadata for a video `File`."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-gemini-file"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.