---
title: ClassifyImageRequest
framework: vision
role: symbol
role_heading: Structure
path: vision/classifyimagerequest
---

# ClassifyImageRequest

A request to classify an image.

## Declaration

```swift
struct ClassifyImageRequest
```

## Overview

Overview This type of request produces a collection of ClassificationObservation objects that describe an image. Access the possible classifications through the supportedIdentifiers property. if let imageURL = Bundle.main.url(forResource: "ClassificationImage",                                       withExtension: "jpg") {     do {         let request = ClassifyImageRequest()         let results = try await request.perform(on: imageURL)         for classification in results {             print("Classified \(classification.identifier)")         }     } catch {         print("Encountered an error when performing the request: \(error.localizedDescription)")     } }

## Topics

### Creating a request

- [init(_:)](vision/classifyimagerequest/init(_:).md)

### Performing a request

- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-80bya.md)
- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-3f3f1.md)
- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-qxxx.md)
- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-xspx.md)
- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-3hddl.md)
- [perform(on:orientation:)](vision/imageprocessingrequest/perform(on:orientation:)-85ex1.md)

### Understanding the result

- [ClassificationObservation](vision/classificationobservation.md)

### Configuring a request

- [cropAndScaleAction](vision/classifyimagerequest/cropandscaleaction.md)
- [ImageCropAndScaleAction](vision/imagecropandscaleaction.md)
- [supportedIdentifiers](vision/classifyimagerequest/supportedidentifiers.md)

### Getting the revision

- [revision](vision/classifyimagerequest/revision-swift.property.md)
- [supportedRevisions](vision/classifyimagerequest/supportedrevisions.md)
- [ClassifyImageRequest.Revision](vision/classifyimagerequest/revision-swift.enum.md)

## Relationships

### Conforms To

- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [ImageProcessingRequest](vision/imageprocessingrequest.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [VisionRequest](vision/visionrequest.md)

## See Also

### Image classification and recognition

- [Classifying images for categorization and search](vision/classifying-images-for-categorization-and-search.md)
- [DetectHumanRectanglesRequest](vision/detecthumanrectanglesrequest.md)
- [RecognizeAnimalsRequest](vision/recognizeanimalsrequest.md)
