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.

Basic Setup

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}`);

Additional Options

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

// The variance parameter (0-1) controls how creative the model generation is
// Higher values = more creative, lower = more precise
const url = await meshifai.textTo3d('A luxury sports car', { 
  variance: 0.5 
});

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

// 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}`);

Model Format

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

  • 3D modeling software like Blender

  • Game engines like Unity and Unreal

  • Web-based 3D viewers

  • AR/VR applications

More formats coming soon!

Last updated