---
name: 2dto3d
description: Make realistic 3D models (GLB) from photos of real objects with the 2dto3D MCP server. View, share, embed or export the models, show them in AR, or import them into Blender. Use this skill when the user wants a 3D model of a real object from a photo, an AR view of a product, or a 3D file for a scene or a store.
---

# 2dto3D

2dto3D makes a realistic 3D model from photos of one real object. Each model has an
interactive viewer, an AR link for phones, an embed code, and export to other formats. The
model is in metres, at the real size of the object.

## Setup

The tools come from the 2dto3D MCP server at `https://mcp.2dto3d.app/mcp`. If the tools are
not available, read `https://2dto3d.app/llms.txt` and do the setup steps in it.

## Tools

| Tool | Cost | What it does |
|---|---|---|
| `get_account` | Free | Shows the balance, the prices and the link to buy credits. |
| `create_upload` | Free | Makes an upload slot for a local photo. |
| `generate_model` | 10 credits (about $2) | Starts a model from 1 to 4 photos of one object. |
| `get_model` | Free | Shows the progress, the links and the file URLs. |
| `list_models` | Free | Lists the models in the account. |
| `export_model` | Free for GLB | A new format costs 2 credits. A format that exists is free. |

## Rules

1. Before you call `generate_model`, make sure that the user wants to spend 10 credits (about
   $2). A request such as "make a 3D model of this" is enough.
2. Call `generate_model` one time for each object. Each call charges the account.
3. A model takes about 5 minutes. Do not tell the user that it is faster.
4. Use the `ready` field. The stage `"finishing"` means that the model exists, but its AR and
   web files do not exist yet. Give links to the user only when `ready` is true.
5. You cannot pay. If a tool returns `payment_required`, give the user `billing_url`. Then
   stop and wait until the user tells you that they bought credits.
6. If a tool returns `spend_cap_reached`, stop. Tell the user that this connection used all
   of its credits for today.

## Photos

- Use one object in each model. Do not mix different objects.
- A good photo shows the full object in sharp focus.
- Use even light and a plain background.
- Photos of the same object from different angles give a better model. You can send up to 4.

## Send a photo to 2dto3D

Use the first method that you can use:

1. If the photo is at a public `https` URL, put the URL in `image_urls`.
2. If the photo is a local file and you can run commands, call `create_upload`. Then send the
   file:

   ```bash
   curl -X PUT --data-binary @photo.jpg -H "content-type: image/jpeg" "<put_url>"
   ```

3. If you cannot run commands, call `create_upload`. Give `upload_page_url` to the user. Ask
   the user to upload the photo on that page and to tell you after the upload.

Then call `generate_model` with `upload_ids: ["<upload_id>"]`. An upload slot expires after
one hour.

## Workflow: make a model from a photo

1. Call `get_account`. If `models_remaining` is 0, give the user `billing_url` and stop.
2. Send the photo to 2dto3D.
3. Call `generate_model`. Keep the `id`.
4. Call `get_model` with the `id` every 30 seconds. Tell the user the progress. The
   `packshot_images` appear before the model is complete.
5. When `ready` is true, give the user `links.view_url` and `links.ar_url`.

## Workflow: put a model into Blender

Use this workflow when the Blender MCP server is also connected.

1. Make the model. Use the workflow above.
2. Get `files.glb_for_editing` from `get_model`. This file is the full model as a plain GLB.
3. Run this code in Blender with the Blender MCP `execute_blender_code` tool:

   ```python
   import bpy, os, tempfile, urllib.request

   url = "<files.glb_for_editing>"
   path = os.path.join(tempfile.gettempdir(), "2dto3d_model.glb")
   urllib.request.urlretrieve(url, path)
   bpy.ops.import_scene.gltf(filepath=path)
   ```

4. Do not change the scale of the model unless the user asks. The model is already at the
   real size of the object.

## Workflow: show a model on a web page or in AR

- To show the model on a web page, give the user `links.embed_html`. It is an `iframe`.
- To show the model in AR, give the user `links.ar_url`. On a phone, it opens AR. On a
  computer, it shows a QR code for a phone.
- For a third-party viewer, a store or an AR app, use `files.glb_for_viewers_and_ar`.
- For iOS Quick Look, use `files.usdz_for_ios`.

## Export to other formats

Call `export_model` with the `id` and one format: `glb`, `gltf`, `fbx`, `obj`, `usdz`,
`stl` or `3mf`. If the result has a `url`, the file is ready. If the result has the status
`"processing"`, call `get_model` again after one minute and look in `exports`.

## Errors

| `error` | What to do |
|---|---|
| `payment_required` | Give the user `billing_url`. Wait until the user buys credits. |
| `spend_cap_reached` | Stop. Tell the user. The limit resets at 00:00 UTC. |
| `unauthorized` | Tell the user to connect 2dto3D again in the agent settings. |
| `invalid_input` | Read the message. Correct the input. Then try again. |
| `not_found` | Make sure that the `id` is correct. Use `list_models` to find it. |
| `rate_limited` | Wait one minute. Then try again. |

If `get_model` shows the stage `"failed"`, 2dto3D gives back the credits. Try again with a
clearer photo.

## Limits

- 2dto3D optimizes for realism, not speed. A model takes about 5 minutes.
- The size comes from what the object looks like. A photo on a plain background has no size
  reference, so a toy or a replica can get the size of the real object. Tell the user to
  examine the size of such objects.
- 2dto3D cannot host a GLB file that you made in another tool, for example Blender.
