projects

POST /v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/files

Uploads a file that can be referenced by ID from subsequent Claude model requests.

Request

  • Base URL
    https://aiplatform.googleapis.com
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/cloud-platform
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform

Path parameters

projectsIdstring required
locationsIdstring required
publishersIdstring required

Request body

GoogleCloudAiplatformV1CreateFileRequest required

Request message for ClaudeFileService.CreateFile.

Response

Successful response

created_atstring google-datetime

Output only. The time at which the file was created.

downloadableboolean

Output only. Whether the contents of this file can be retrieved with DownloadFile. False for user-uploaded files, true for tool-generated ones.

expires_atstring google-datetime

Output only. The time at which the file expires and is deleted, set from the expires_in_seconds upload form field. Unset for files that do not expire, which is serialised as null.

filenamestring

Output only. The original name of the uploaded file, taken from the Content-Disposition header on upload. Between 1 and 255 characters. Control characters and the characters <>:"|?*\/ are not accepted.

idstring

Output only. The server-assigned identifier of the file, for example file_abc123. This is the ID to pass in subsequent model requests.

mime_typestring

Output only. The media type of the file, taken from the Content-Type header of the file part on upload.

size_bytesinteger

Output only. The size of the file in bytes.

typestring

Output only. The object type. Always file.

Changes

No recorded changes to this operation across all 8 revisions of this API.