<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/AIModel/init(resolvingBookmark:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime7AIModelV0A11AIDelegatesE17resolvingBookmarkACSg10Foundation4DataV_tKcfc"
  },
  "title" : "init(resolvingBookmark:)"
}
-->

# init(resolvingBookmark:)

Create an `AIModel`  by resolving bookmark data pointing to its specialized asset in a cache

```
init?(resolvingBookmark bookmark: Data) throws
```

## Parameters

`bookmark`

Data previously obtained from `AIModel.bookmarkData`.

## Return Value

If the bookmark data can be resolved, the resulting `AIModel`
pins and references the cache entry as the model
that generated the bookmark data. If it cannot be resolved
due to the specialized asset entry no longer being present nil is returned.

## Discussion

Resolving bookmark data involves checking it is a valid bookmark, validating the
associated cache and cache entry it references exists, and returning a AIModel
constructed with that specialized asset contained within that entry.
If any of these steps fail, nil is returned

> Throws: If the bookmark data is malformed due to not being sourced from
> AIModel.bookmarkData an error is thrown

---

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)