vendor_connectors.meshy.image3d
Image-to-3D API.
Usage: from vendor_connectors.meshy import image3d
result = image3d.generate("https://example.com/image.png")print(result.model_urls.glb)Module Contents
Section titled “Module Contents”Functions
Section titled “Functions”create | Create image-to-3d task. Returns task_id. |
|---|---|
get | Get task status. |
refine | Refine preview to full quality. Returns new task_id. |
poll | Polls the status of an image-to-3D task until it completes, fails, expires, or times out. |
generate | Generate a 3D model from an image. |
vendor_connectors.meshy.image3d.create(request: vendor_connectors.meshy.models.Image3DRequest) → str
Section titled “vendor_connectors.meshy.image3d.create(request: vendor_connectors.meshy.models.Image3DRequest) → str”Create image-to-3d task. Returns task_id.
vendor_connectors.meshy.image3d.get(task_id: str) → vendor_connectors.meshy.models.Image3DResult
Section titled “vendor_connectors.meshy.image3d.get(task_id: str) → vendor_connectors.meshy.models.Image3DResult”Get task status.
vendor_connectors.meshy.image3d.refine(task_id: str) → str
Section titled “vendor_connectors.meshy.image3d.refine(task_id: str) → str”Refine preview to full quality. Returns new task_id.
vendor_connectors.meshy.image3d.poll(task_id: str, interval: float = 5.0, timeout: float = 600.0) → vendor_connectors.meshy.models.Image3DResult
Section titled “vendor_connectors.meshy.image3d.poll(task_id: str, interval: float = 5.0, timeout: float = 600.0) → vendor_connectors.meshy.models.Image3DResult”Polls the status of an image-to-3D task until it completes, fails, expires, or times out.
Args: task_id: The ID of the image-to-3D task to poll. interval: Time in seconds between polling attempts (default: 5.0). timeout: Maximum time in seconds to wait for task completion (default: 600.0).
Returns: Image3DResult: The result of the completed task.
Raises: RuntimeError: If the task fails or expires. TimeoutError: If the polling times out before the task completes.
vendor_connectors.meshy.image3d.generate(image_url: str, , topology: str | None = None, target_polycount: int | None = None, enable_pbr: bool = True, wait: bool = True) → vendor_connectors.meshy.models.Image3DResult | str
Section titled “vendor_connectors.meshy.image3d.generate(image_url: str, , topology: str | None = None, target_polycount: int | None = None, enable_pbr: bool = True, wait: bool = True) → vendor_connectors.meshy.models.Image3DResult | str”Generate a 3D model from an image.
Args: image_url: URL to the source image topology: Mesh topology (“quad” or “triangle”) target_polycount: Target polygon count enable_pbr: Enable PBR materials wait: Wait for completion (default True)
Returns: Image3DResult if wait=True, task_id if wait=False