---
title: "analyze(_:for:)"
framework: Media Intelligence
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "mediaintelligence/videoanalyzer/analyze(_:for:)"
---

# analyze(_:for:)

Analyzes a video asset using the specified requests.

## Declaration

```swift
final nonisolated(nonsending) func analyze<each T>(_ asset: MediaIntelligenceVideoAsset, for request: repeat each T) async throws -> (repeat Result<(each T).Result, any Error>) where repeat each T : VideoAnalyzer.Request
```

## Parameters

- `asset`: The video asset to analyze.
- `request`: One or more analysis requests to perform.

## Mentioned in

Finding the best moments in a video

## Return Value

Return Value A tuple of Result values, one per request.

## Discussion

Discussion Pass one or more values of type VideoAnalyzer.Request. The method returns a tuple containing one Result per request, in the same order you provided them. Check each element individually because a failure in one request doesn’t affect the others.

## See Also

### Analyzing a video asset

- [shared](mediaintelligence/videoanalyzer/shared.md)
- [VideoAnalyzer.Request](mediaintelligence/videoanalyzer/request.md)
- [VideoAnalyzer.Result](mediaintelligence/videoanalyzer/result.md)
