Image to 3D
Quick Primer

Quick Primer on Image-to-3D

Image to 3D offers options for geometry and texture generation:

Geometry:

  • Base: Most consistent model.
  • Turbo: Fastest, but sometimes lower quality.

Texture:

  • None: No texture will be generated.
  • Baked: Fast, but albedo may contain baked lighting.
  • PBR: Best for use with lighting.

Here are some examples of how to use the API:

 
import requests
import json
 
url = "https://api.csm.ai/image-to-3d-sessions"
 
payload = json.dumps({
  "image_url": "<IMAGE-URL>",
  "geometry_model": "turbo"
})
 
headers = {
  'x-api-key': '<X-API_KEY>',
  'Content-Type': 'application/json'
}
 
response = requests.request("POST", url, headers=headers, data=payload)
 
print(response.text)
 

You can get the API key from https://3d.csm.ai/my-profile (opens in a new tab)

Create

To start a session, upload the image_url along with the desired settings as described in the Create Session (opens in a new tab) documentation.

Geometry Generation

Once the image is uploaded, it is used to generate the geometry for the mesh.

  • Duration: Approximately one minute.
  • Session status during processing: in_progress.
  • Session status upon completion: complete.
  • Session status upon failure: failed.

Texture Generation

After the geometry has been created, the texture for the mesh will be generated (if requested).

  • Duration: Approximately one minute.
  • Session status during processing: in_progress.
  • Session status upon completion: complete.
  • Session status upon failure: failed.