Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Specifies the metadata config for RagFiles. Including paths for metadata schema and metadata. Alteratively, inline metadata schema and metadata can be provided.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[],[],null,["# Method: media.upload\n\n**Full name**: media.upload\n\nUpload a file into a RagCorpus. \n\n### Endpoint\n\nupload uri, for media upload requests: \n\\`post `https:``/``/aiplatform.googleapis.com``/upload``/v1beta1``/{parent}``/ragFiles:upload` \n- Metadata URI, for metadata-only requests: \n `POST https://aiplatform.googleapis.com/v1beta1/{parent}/ragFiles:upload`\n\n### Path parameters\n\n`parent` `string` \nRequired. The name of the RagCorpus resource into which to upload the file. Format: `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `ragFile` `object (`[RagFile](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/projects.locations.ragCorpora.ragFiles#RagFile)`)` \nRequired. The RagFile to upload.\n`uploadRagFileConfig` `object (`[UploadRagFileConfig](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/media/upload#UploadRagFileConfig)`)` \nRequired. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/media/upload#google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile). \n\n### Response body\n\nResponse message for [VertexRagDataService.UploadRagFile](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/media/upload#google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile).\n\nIf successful, the response body contains data with the following structure:\nFields \n`result` `Union type` \nThe result of the upload. `result` can be only one of the following:\n`ragFile` `object (`[RagFile](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/projects.locations.ragCorpora.ragFiles#RagFile)`)` \nThe RagFile that had been uploaded into the RagCorpus.\n`error` `object (`[Status](/vertex-ai/generative-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status)`)` \nThe error that occurred while processing the RagFile. \n\nUploadRagFileConfig\n-------------------\n\nConfig for uploading RagFile.\nFields `ragFileChunkingConfig` \n**(deprecated)** `object (`[RagFileChunkingConfig](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/RagFileChunkingConfig)`)` \n| This item is deprecated!\n\nSpecifies the size and overlap of chunks after uploading RagFile.\n`ragFileTransformationConfig` `object (`[RagFileTransformationConfig](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/RagFileTransformationConfig)`)` \nSpecifies the transformation config for RagFiles.\n`ragFileMetadataConfig` `object (`[RagFileMetadataConfig](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/RagFileMetadataConfig)`)` \nSpecifies the metadata config for RagFiles. Including paths for metadata schema and metadata. Alteratively, inline metadata schema and metadata can be provided.\n`ragFileParsingConfig` `object (`[RagFileParsingConfig](/vertex-ai/generative-ai/docs/reference/rest/v1beta1/RagFileParsingConfig)`)` \nOptional. Specifies the parsing config for RagFiles. RAG will use the default parser if this field is not set."]]