<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/VNCoreMLRequest/init(model:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "c:objc(cs)VNCoreMLRequest(im)initWithModel:completionHandler:"
  },
  "title" : "init(model:completionHandler:)"
}
-->

# init(model:completionHandler:)

Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.

```
init(model: VNCoreMLModel, completionHandler: VNRequestCompletionHandler? = nil)
```

## Parameters

`model`

The <doc://com.apple.documentation/documentation/CoreML> model on which to base the Vision request.

`completionHandler`

An optional block of code to execute after model initialization.

## Discussion

Initialization can fail if the <doc://com.apple.documentation/documentation/CoreML> model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)