# Quick Start

Get up and running with the MeshifAI JavaScript SDK in minutes.\
\
You can generate both `Textured` and `Untextured` models. Textured models can often put a lot of strain on the server and may not be as reliable as untextured models but provide a much higher quality result.

### <kbd>Basic Setup</kbd>

```javascript
import meshifai from '@0xretrodev/meshifai';

// Generate an untextured model (faster and more reliable)
const result = await meshifai.textTo3d('A cute cat');
console.log(`Download URL: ${result.modelUrl}`);

// Generate a textured model with PBR materials
const texturedResult = await meshifai.textTo3d('A red apple', { 
  textured: true 
});
console.log(`Download URL: ${texturedResult.modelUrl}`);


```

{% hint style="warning" %}
Please note that `Textured Models` can take longer to generate and are highly experimental.
{% endhint %}

### <kbd>Additional Options</kbd>

The `textTo3d` function accepts an optional second parameter with options for `untextured` models:

```javascript
// The highRes parameter controls the quality of the model generation
// false = standard quality (faster), true = high resolution (better quality, slower)
const url = await meshifai.textTo3d('A luxury sports car', {
  highRes: true
});
```

\
The `textTo3d` function also accepts an optional second parameter with options for `textured` models:

```javascript
// Generate a high-quality textured model by increasing polygon count
const highQualityResult = await meshifai.textTo3d('A red apple', { 
  textured: true,
  polygons: 50000  // Default is 25000, higher = better quality
});
console.log(`Download URL: ${highQualityResult.modelUrl}`);
```

### <kbd>Model Format</kbd>

The generated 3D models are in `.glb` format (GL Transmission Format Binary), which is widely supported by:<br>

* 3D modeling software like Blender
* Game engines like Unity and Unreal
* Web-based 3D viewers
* AR/VR applications

More formats coming soon!
