---
title: "SpatialGltfModelSource"
description: "Defines the source for a 3D model to be rendered by the SpatialGltfModel composable."
type: "interface"
lastmod: "2026-05-08T01:17:01.432587Z"
---
## API Reference

> Source set: Android

```kotlin
public interface SpatialGltfModelSource
```

Defines the source for a 3D model to be rendered by the [SpatialGltfModel](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialGltfModel) composable.

Instances of [SpatialGltfModelSource](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialGltfModelSource) are created using `fromPath`, `fromUri`, or `fromData`.

## Functions

### createModel

```kotlin
public suspend fun createModel(session: Session): GltfModel
```

Creates a `GltfModel` from the source.

#### Parameters

| | |
| --- | --- |
| session | The XR session to create the model in. |

#### Returns

| | |
| --- | --- |
|  | The created `GltfModel`. |
