> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/v2/multi-image-to-3d, part of the Meshy API v2 docs.
>
> - v2 docs index: https://docs.meshy.ai/api/v2/llms.txt
> - All v2 pages in one file: https://docs.meshy.ai/api/v2/llms-full.txt
> - OpenAPI spec for v2: https://docs.meshy.ai/api/v2/openapi.yaml

---

# Multi-Image to 3D API

Turn one to four images of the same object, from different angles, into one 3D model.

> **Note:** Moving from v1? The main changes for Multi-Image to 3D:
>   * `target_formats` defaults to GLB.
>   * A textured model needs `texture_model` set to `meshy-7` or `meshy-n1`.
>   * Sending both `texture_prompt` and `texture_image_url` returns `400`.
>   * Results are in `output`.
>
>   See [what changed for Multi-Image to 3D](/api/migrate-to-v2/reference#image-to-3d).

---

## POST /openapi/v2/multi-image-to-3d -- Create a Multi-Image to 3D task

Creates a Multi-Image to 3D task and returns the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object). The task runs in the background. To read its result, see [Get the result](#get-the-result). For how long a task usually takes, see [Processing times](/api/task-lifecycle#processing-times).

### Parameters

  - `image_urls` · *string[]* · **required**

  Required unless you send `input_task_id`. One to four images of the same object, each as a public URL or a data URI (`data:image/png;base64,...`). Put the front view first. Meshy uses the first image as the front view. With `meshy-7.1` or `latest`, the order of the others doesn't matter. More than four images returns `400`.

  Each image must be a JPG, JPEG, PNG, or WebP file of at most 20 MB, at least 32 pixels on each side, and at most 178,956,970 pixels (width × height).

  - `input_task_id` · *string* · **required**

  Required unless you send `image_urls`. The ID of a Text to Image or Image to Image task to use as the input, including a multi-view one. The task must be one you created with the API and have the status `SUCCEEDED`. Meshy uses its images, one to four, as the input. If you send both `image_urls` and `input_task_id`, Meshy uses `input_task_id`.

  - `ai_model` · *string* · default: `latest`

  The model that generates the 3D model.

  Available values:
  * `latest`: Meshy 7.1
  * `meshy-7.1`
  * `meshy-6`
  * `meshy-6-lite`
  * `meshy-standard-latest`: same as `latest`

  Smart Topology models aren't available for Multi-Image to 3D, and return `400`.

  See [Models](https://docs.meshy.ai/api/v2/models.md#choose-by-project) for which model fits your project, such as a real object or a 3D print.

  - `geometry_resolution` · *string* · default: `standard`

  How much geometry detail to generate.

  Available values:
  * `standard`
  * `2k`: adds the Ultra pass

  `2k` needs `meshy-7.1` or `latest`. With other models, it returns `400`. Multi-Image to 3D has no `4k`, so `4k` returns `400`.

  - `should_texture` · *boolean* · default: `true`

  Whether to generate textures. `true` returns a textured model, and `false` returns an untextured mesh. With `false`, Meshy ignores `texture_model` and the other texture parameters.

**Only when `should_texture` is set:**
  - `texture_model` · *string* · **required**

  Required unless `should_texture` is `false`. The model that textures the 3D model, in the same task. Every `ai_model` takes each of these values.

  Available values:
  * `meshy-7`: Meshy 7, with PBR maps, a text prompt, and textures up to 8K
  * `meshy-n1`: Meshy N1, a 2K base color texture from reference images only

  Multi-Image to 3D takes only texture models that paint from several views, so any other value returns `400`. A textured request without `texture_model` returns `400`, and so does an option the texture model doesn't support. The texture model doesn't change the credit cost. See [Texture models](https://docs.meshy.ai/api/v2/image-to-3d.md#texture-models).

  - `enable_pbr` · *boolean* · default: `false`

  Whether to also generate metallic, roughness, and normal maps. With `texture_model: "meshy-n1"`, `true` returns `400`.

  - `texture_resolution` · *string* · default: `2k`

  Size of the base color texture.

  Available values:
  * `2k`
  * `4k`
  * `8k`

  `4k` and `8k` need `texture_model: "meshy-7"`. With `meshy-n1`, they return `400`.

  - `texture_prompt` · *string*

  Text that guides the texture, up to 800 characters. Longer text returns `400`. With `texture_model: "meshy-n1"`, sending it returns `400`.

  - `texture_image_url` · *string*

  One image that guides the texture, as a public URL or a data URI. It follows the same format and size rules as the images in `image_urls`. With `texture_model: "meshy-n1"`, Meshy textures from this image as the front view.

  - `texture_image_urls` · *string[]*

  One to four images of the object that guide the texture. They follow the same format and size rules as the images in `image_urls`, and they can differ from `image_urls`. Meshy uses the first image as the front view. The order of the other views (left, back, right) doesn't matter.

  An empty list, or more than four images, returns `400`.

Send at most one of `texture_prompt`, `texture_image_url`, and `texture_image_urls`. Sending two or more returns `400`.

  - `target_formats` · *string[]* · default: `["glb"]`

  The file formats to generate. Meshy generates only the formats you list.

  Available values:
  * `glb`
  * `obj`
  * `fbx`
  * `stl`
  * `usdz`
  * `3mf`

  Meshy scales STL and 3MF files down to at most 150 mm on the longest side.

  - `should_remesh` · *boolean* · default: `true (meshy-6-lite), false (other models)`

  Whether to remesh the model after generation. `false` keeps the mesh as generated.

**Only when `should_remesh` is set:**
  - `topology` · *string* · default: `triangle`

  The face type of the remeshed model, `triangle` or `quad`. With `texture_model: "meshy-n1"`, `quad` returns `400`.

  - `target_polycount` · *integer* · default: `30000`

  The number of faces to aim for, from `100` to `300000`. A value outside the range returns `400`.

  - `decimation_mode` · *integer*

  Adaptive face count, by level. When you set it, Meshy ignores `target_polycount`.

  Available values:
  * `1`: ultra
  * `2`: high
  * `3`: medium
  * `4`: low

  - `save_pre_remeshed_model` · *boolean* · default: `false`

  Whether to also return the GLB from before the remesh, in `output.model_urls.pre_remeshed_glb`.

  - `pose_mode` · *string*

  The pose for a character model, `a-pose` or `t-pose`. Leave it out for no pose.

  - `image_enhancement` · *boolean* · default: `true`

  Whether to clean up the input images before generating. `false` uses the images exactly as they are. `meshy-6-lite` ignores this setting.

  - `remove_lighting` · *boolean* · default: `true`

  Whether to remove highlights and shadows from the base color texture. The texture models that `texture_model` takes don't use this setting, so Meshy ignores it.

  - `moderation` · *boolean* · default: `false`

  Whether to screen these inputs for harmful content before generating:
  * The input images
  * `texture_image_url` or `texture_image_urls`
  * `texture_prompt`

  - `auto_size` · *boolean* · default: `false`

  Whether to estimate the object's real-world height and scale the model to it.

**Only when `auto_size` is set:**
  - `origin_at` · *string* · default: `bottom`

  Where to place the model's origin, `bottom` or `center`.

  - `multi_view_thumbnails` · *boolean* · default: `false`

  Whether to also render front, right, back, and left previews, returned in `output.thumbnail_urls`. This adds about 5 seconds to the task.

  - `thumbnail_resolution` · *integer* · default: `512`

  The width and height, in pixels, of the task's preview images: `512` or `1024`. It applies to `output.thumbnail_url` and to any optional preview you request. Any other value returns `400`.

### Returns

`202 Accepted` with the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object). The task starts as `PENDING`, with your request in `input` and `output` set to `null`.

Two response headers help you read the task:
* `Location`: the task's URL on [Tasks](https://docs.meshy.ai/api/v2/tasks.md#how-a-task-runs)
* `Retry-After`: how many seconds to wait before you first read it

### Failure modes

  - `400 - Bad Request`

  The request can't run. For example:
  * Neither `image_urls` nor `input_task_id` was sent
  * There are more than four images
  * A textured request didn't send `texture_model`, or sent `meshy-6-lite`
  * Two texture inputs were sent
  * An image can't be downloaded, is over 20 MB, or is outside the pixel limits
  * `geometry_resolution` isn't available for the model
  * The texture model doesn't support an option in the request, for example `enable_pbr: true` or a `4k` texture with `meshy-n1`
  * `ai_model` is a Smart Topology model

  The error message says which problem it found. See [Errors](https://docs.meshy.ai/api/v2/errors.md#request-errors).

  - `401 - Unauthorized`

  The API key is missing or invalid. Check the `Authorization` header.

  - `402 - Payment Required`

  One of these applies:
  * The account doesn't have enough credits.
  * The account reached a credit limit.
  * The account is on the free plan.

  Check your credits and plan, then retry.

  - `403 - Forbidden`

  Content moderation blocked the prompt or an input image. Change the input, then retry.

  - `404 - Not Found`

  `input_task_id` doesn't match any of your tasks.

  - `429 - Too Many Requests`

  One of these limits was reached:
  * You sent too many requests. Wait the number of seconds in `Retry-After`, then retry.
  * Too many of your tasks are queued or running. Wait for some to finish, then retry.
  * On an unlimited plan with no credits left, you reached the number of tasks that can run without credits. Wait for a task to finish, or add credits.

**cURL**

```bash
# Two views, textured with Meshy 7: a GLB
curl https://api.meshy.ai/openapi/v2/multi-image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_urls": [
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
    ],
    "texture_model": "meshy-7"
  }'

# Ultra geometry, PBR maps, GLB and USDZ
curl https://api.meshy.ai/openapi/v2/multi-image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_urls": [
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
    ],
    "geometry_resolution": "2k",
    "texture_model": "meshy-7",
    "enable_pbr": true,
    "target_formats": ["glb", "usdz"]
  }'
```

```javascript
// Two views, textured with Meshy 7: a GLB
const response = await fetch("https://api.meshy.ai/openapi/v2/multi-image-to-3d", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image_urls: [
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
    ],
    texture_model: "meshy-7",
  }),
});
const task = await response.json();
console.log(task.id, task.status);
```

```python
import os
import requests

# Two views, textured with Meshy 7: a GLB
response = requests.post(
    "https://api.meshy.ai/openapi/v2/multi-image-to-3d",
    headers={"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"},
    json={
        "image_urls": [
            "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
            "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
        ],
        "texture_model": "meshy-7",
    },
)
response.raise_for_status()
task = response.json()
print(task["id"], task["status"])
```

**Response**

```json
{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "multi-image-to-3d",
  "status": "PENDING",
  "progress": 0,
  "created_at": 1790640079880,
  "started_at": null,
  "finished_at": null,
  "expires_at": null,
  "preceding_tasks": 3,
  "consumed_credits": 30,
  "task_error": null,
  "input": {
    "image_urls": [
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
    ],
    "texture_model": "meshy-7"
  },
  "output": null
}
```

---

## Get the result
Read Multi-Image to 3D tasks the same way as every other v2 task, through the [Tasks](https://docs.meshy.ai/api/v2/tasks.md) routes. To list only Multi-Image to 3D tasks, filter by `type=multi-image-to-3d`.

| To | Call |
| --- | --- |
| Get one task | [`GET /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#get-a-task) |
| Wait for updates | [`GET /openapi/v2/tasks/{id}/stream`](https://docs.meshy.ai/api/v2/tasks.md#stream-a-task) or a [webhook](https://docs.meshy.ai/api/v2/webhooks.md) |
| List your tasks | [`GET /openapi/v2/tasks?type=multi-image-to-3d`](https://docs.meshy.ai/api/v2/tasks.md#list-tasks) |
| Delete a task | [`DELETE /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#delete-a-task) |

---

## Multi-Image to 3D output
When the task succeeds, `output` holds these fields. The rest of the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object) is the same for every task type. The URLs in `output` stop working at `expires_at`.

  - `model_urls` · *object*

  Signed URLs to the generated files, one per format in `target_formats`, keyed by format. Two more keys can appear:
  * `mtl`: the material file of a textured `obj`
  * `pre_remeshed_glb`: the GLB from before the remesh, when you sent `save_pre_remeshed_model: true` and the model was remeshed

  - `thumbnail_url` · *string*

  Signed URL to a PNG preview of the model, with a transparent background.

  - `thumbnail_urls` · *object | null*

  Signed URLs to the previews, keyed by view:
  * `front`
  * `right`
  * `back`
  * `left`

  `null` unless you sent `multi_view_thumbnails: true`. A view that failed to render is left out.

  - `texture_urls` · *array*

  One item per texture set, with a signed URL for each of these maps:
  * `base_color`
  * `metallic`
  * `roughness`
  * `normal`
  * `metallic_roughness`
  * `emission`

  A map that wasn't produced is `null`. The array is empty for an untextured model.

**Succeeded Multi-Image to 3D task**

```json
{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "multi-image-to-3d",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640079893,
  "finished_at": 1790640183455,
  "expires_at": 1790899383455,
  "preceding_tasks": 0,
  "consumed_credits": 30,
  "task_error": null,
  "input": {
    "image_urls": [
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
      "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
    ],
    "texture_model": "meshy-7"
  },
  "output": {
    "model_urls": {
      "glb": "https://assets.meshy.ai/***/output/model.glb?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/output/preview.png?Expires=***",
    "thumbnail_urls": null,
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/output/texture_0.png?Expires=***",
        "metallic": null,
        "roughness": null,
        "normal": null,
        "metallic_roughness": null,
        "emission": null
      }
    ]
  }
}
```
