---
title: "isValid(at:)"
framework: coreai
role: symbol
role_heading: Type Method
path: "coreai/aimodelasset/isvalid(at:)"
---

# isValid(at:)

Returns a Boolean value that indicates whether the URL contains a valid model asset.

## Declaration

```swift
static func isValid(at url: URL) -> Bool
```

## Parameters

- `url`: The file URL to validate.

## Return Value

Return Value true if the URL points to a valid model asset; otherwise, false.

## Discussion

Discussion This checks that: the URL is a file URL the extension is one of the known model asset extensions the model contains either a source program or a derived artifact

## See Also

### Loading an asset

- [init(contentsOf:)](coreai/aimodelasset/init(contentsof:).md)
