AI-generated Key Takeaways
- 
          PickedMediaItemresource represents a photo or video selected by the user, containing an ID, creation time, type, and media file information.
- 
          MediaFileprovides details about the media, including a URL for fetching its bytes, MIME type, filename, and metadata like dimensions.
- 
          MediaFileMetadataincludes basic file information like width, height, camera details, and specific metadata for photos (PhotoMetadata) or videos (VideoMetadata).
- 
          Photos metadata ( PhotoMetadata) may include details like focal length, aperture, ISO, and exposure time.
- 
          Videos metadata ( VideoMetadata) may include frame rate (fps) and processing status.
- Resource: PickedMediaItem
- Type
- MediaFile
- MediaFileMetadata
- PhotoMetadata
- VideoMetadata
- VideoProcessingStatus
- Methods
Resource: PickedMediaItem
Representation of a photo or video that was picked by the user.
| JSON representation | 
|---|
| { "id": string, "createTime": string, "type": enum ( | 
| Fields | |
|---|---|
| id | 
 Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item. | 
| createTime | 
 Time when the media item was created (not when it was uploaded to Google Photos). Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:  | 
| type | 
 The type of this media item. | 
| mediaFile | 
 The media file that constitutes this media item. | 
Type
The type of a media item.
| Enums | |
|---|---|
| TYPE_UNSPECIFIED | The type is not specified. | 
| PHOTO | The media item represents a photo. | 
| VIDEO | The media item represents a video. | 
MediaFile
Representation of a media file.
| JSON representation | 
|---|
| {
  "baseUrl": string,
  "mimeType": string,
  "filename": string,
  "mediaFileMetadata": {
    object ( | 
| Fields | |
|---|---|
| baseUrl | 
 A URL to fetch the media file's bytes. To download a media file, the API client must add the parameters specified in the developer documentation to this URL. For example,  | 
| mimeType | 
 MIME type of the media file. For example,  | 
| filename | 
 Filename of the media file. | 
| mediaFileMetadata | 
 Metadata related to the media file, such as height and width. | 
MediaFileMetadata
Metadata about a media file.
| JSON representation | 
|---|
| { "width": integer, "height": integer, "cameraMake": string, "cameraModel": string, // Union field | 
| Fields | |
|---|---|
| width | 
 Original width (in pixels) of the media file. | 
| height | 
 Original height (in pixels) of the media file. | 
| cameraMake | 
 Brand of the camera with which the media was captured. | 
| cameraModel | 
 Model of the camera with which the media was captured. | 
| Union field metadata. Metadata for the media file specific to its media type.metadatacan be only one of the following: | |
| photoMetadata | 
 Metadata for a photo media type. | 
| videoMetadata | 
 Metadata for a video media type. | 
PhotoMetadata
Metadata that is specific to a photo, such as, ISO, focal length, and exposure time.
Some of these fields may not be set.
| JSON representation | 
|---|
| { "focalLength": number, "apertureFNumber": number, "isoEquivalent": integer, "exposureTime": string } | 
| Fields | |
|---|---|
| focalLength | 
 Focal length of the camera lens with which the photo was taken. | 
| apertureFNumber | 
 Aperture f number of the camera lens with which the photo was taken. | 
| isoEquivalent | 
 ISO of the camera with which the photo was taken. | 
| exposureTime | 
 Exposure time of the camera aperture when the photo was taken. A duration in seconds with up to nine fractional digits, ending with ' | 
VideoMetadata
Metadata that is specific to a video. For example, fps.
| JSON representation | 
|---|
| {
  "fps": number,
  "processingStatus": enum ( | 
| Fields | |
|---|---|
| fps | 
 Frame rate of the video. | 
| processingStatus | 
 Processing status of the video. | 
VideoProcessingStatus
Processing status of a video stored in Google Photos.
| Enums | |
|---|---|
| UNSPECIFIED | Video processing status is not specified. | 
| PROCESSING | Video is being processed. The user sees an icon for this video in the Google Photos app; however, it isn't playable yet. | 
| READY | Video processing is complete and this video is now ready for viewing. Attempting to download a video not in the  | 
| FAILED | Something has gone wrong and the video has failed to process. | 
| Methods | |
|---|---|
| 
 | Returns a list of media items picked by the user during the specified session. | 
