> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/resize.
>
> - Full docs index: https://docs.meshy.ai/llms.txt
> - Single-fetch full content: https://docs.meshy.ai/llms-full.txt
> - Tool-calling access via MCP server: https://docs.meshy.ai/api/ai

---
# Resize API

Resize a 3D model to a real-world size, in meters. Set its height or the length of its longest side, or have Meshy estimate the object's real-world height.

---

## POST /openapi/v1/resize -- Create a Resize task

Creates a Resize task. The task runs in the background. For how long a task usually takes, see [Processing times](/api/task-lifecycle#processing-times).

### Parameters

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

  Required unless you send `model_url`. The ID of a task that produced a 3D model, for example a Text to 3D, Image to 3D, Remesh, or Retexture task. The task must come from the API and have the status `SUCCEEDED`. Meshy returns the resized model as a GLB file.

  - `model_url` · *string* · **required**

  Required unless you send `input_task_id`. The model to resize, as a public URL or a data URI. If you send both, Meshy uses `input_task_id`.

  The model must be a GLB, glTF, OBJ, FBX, or STL file of at most 400 MB from an `http` or `https` URL, or 100 MB as a data URI. For a data URI, use the MIME type `application/octet-stream`.

  A file over 100 MB must also follow these rules:
  * A GLB, glTF, FBX, or OBJ file can have at most 10,000,000 faces. Meshy counts faces as triangles, so a quad counts as 2, and a mesh drawn more than once counts once per copy.
  * An FBX file must be binary FBX 7.1 or newer.
  * A GLB or glTF file must not use Draco compression.

  A GLB, OBJ, FBX, or STL file keeps its format in the result. A `.gltf` file or a data URI comes back as GLB.

Send exactly one of `resize_height`, `resize_longest_side`, or `auto_size`. Sending none of them, or more than one, returns `400`.

  - `resize_height` · *number*

  The model's new height in meters, greater than 0. A negative value returns `400`.

  - `resize_longest_side` · *number*

  The new length of the model's longest side in meters, greater than 0. A negative value returns `400`. Meshy keeps the model's aspect ratio.

  - `auto_size` · *boolean*

  Whether to estimate the object's real-world height with AI vision and resize the model to it. Unless you set `origin_at`, Meshy puts the origin at the bottom.

  - `origin_at` · *string* · default: `bottom`

  Where to put the model's origin after resizing, `bottom` or `center`.

### Returns

The `result` field of the response holds the ID of the new Resize task.

### Failure modes

  - `400 - Bad Request`

  The request can't run. The error message says which problem it found. For example:
  * **Missing parameter**: Neither `model_url` nor `input_task_id` was sent.
  * **Missing resize mode**: None of `resize_height`, `resize_longest_side`, and `auto_size` was sent.
  * **Mutually exclusive parameters**: The request has more than one of `resize_height`, `resize_longest_side`, and `auto_size`. Send only one.
  * **Negative size**: `resize_height` or `resize_longest_side` is negative.
  * **Invalid input task**: `input_task_id` isn't a successful API task with a model file.
  * **Invalid model format**: The `model_url` file has an unsupported extension.
  * **Unreachable URL**: Meshy can't download the `model_url` file.
  * **Model file too large**: The `model_url` file is over 400 MB from an `http` or `https` URL, or over 100 MB as a data URI.
  * **Too many faces**: The `model_url` file is over 100 MB and has more than 10,000,000 faces. Reduce the face count, then send the file again.
  * **ASCII FBX over 100 MB**: The `model_url` file is an ASCII FBX over 100 MB. Send it as binary FBX or GLB.
  * **Unreadable model file**: The `model_url` file is over 100 MB, and Meshy can't read its header. For example, it's a Draco-compressed GLB or glTF, or a binary FBX older than 7.1.
  * **Model header too complex**: The `model_url` file is over 100 MB, and its header has too many meshes, nodes, or records to check. Reduce the number of objects in the file, then send it again.

  Fix the request, then send it again. See [Errors](/api/errors#request-errors).

  - `401 - Unauthorized`

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

  - `402 - Payment Required`

  For example:
  * **Insufficient credits**: The account doesn't have enough credits for this task, or the account reached a credit limit. Check your credit balance, then retry.
  * **Free plan**: Creating a task requires a paid plan. Upgrade your plan in your [subscription settings](https://www.meshy.ai/settings/subscription), then retry.

  - `403 - Forbidden`

  `input_task_id` is a bas-relief model, which this endpoint can't resize. The message is `This model type does not support this operation`. Send a different model.

  - `404 - Not Found`

  `input_task_id` doesn't match any of your tasks. Check the task ID, then send the request again.

  - `429 - Too Many Requests`

  You exceeded your rate limit. Wait, then retry. See [Rate limits](/api/rate-limits).

**cURL**

```bash
# Simple: resize to a specific height
curl https://api.meshy.ai/openapi/v1/resize \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "resize_height": 1.8
  }'

# Advanced: resize longest side with custom origin
curl https://api.meshy.ai/openapi/v1/resize \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
    "model_url": "https://example.com/model.glb",
    "resize_longest_side": 2.0,
    "origin_at": "center"
  }'
```

```javascript
import axios from 'axios'

const headers = { Authorization: `Bearer ${YOUR_API_KEY}` };

// Simple: resize to a specific height
const payload = {
    input_task_id: "018a210d-8ba4-705c-b111-1f1776f7f578",
    resize_height: 1.8
};

try {
    const response = await axios.post(
    'https://api.meshy.ai/openapi/v1/resize',
    payload,
  { headers }
);
    console.log(response.data);
} catch (error) {
    console.error(error);
}

// Advanced: resize longest side with custom origin
const advancedPayload = {
    model_url: "https://example.com/model.glb",
    resize_longest_side: 2.0,
    origin_at: "center"
};

try {
    const response = await axios.post(
    'https://api.meshy.ai/openapi/v1/resize',
    advancedPayload,
  { headers }
);
    console.log(response.data);
} catch (error) {
    console.error(error);
}
```

```python
import requests

headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}"
}

# Simple: resize to a specific height
payload = {
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "resize_height": 1.8
}

response = requests.post(
    "https://api.meshy.ai/openapi/v1/resize",
    headers=headers,
    json=payload,
)
response.raise_for_status()
print(response.json())

# Advanced: resize longest side with custom origin
advanced_payload = {
    "model_url": "https://example.com/model.glb",
    "resize_longest_side": 2.0,
    "origin_at": "center"
}

response = requests.post(
    "https://api.meshy.ai/openapi/v1/resize",
    headers=headers,
    json=advanced_payload,
)
response.raise_for_status()
print(response.json())
```

**Response**

```json
{
  "result": "0193bfc5-ee4f-73f8-8525-44b398884ce9"
}
```

---

## GET /openapi/v1/resize/:id -- Get a Resize task

Returns a Resize task by its ID.

### Parameters

  - `id` · *path*

  The task ID from the create response.

### Returns

The [Resize task object](#the-resize-task-object).

```bash
curl https://api.meshy.ai/openapi/v1/resize/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
```

```javascript
import axios from 'axios'

const taskId = 'a43b5c6d-7e8f-901a-234b-567c890d1e2f';
const headers = { Authorization: `Bearer ${YOUR_API_KEY}` };

try {
    const response = await axios.get(
    `https://api.meshy.ai/openapi/v1/resize/${taskId}`,
  { headers }
);
    console.log(response.data);
} catch (error) {
    console.error(error);
}
```

```python
import requests

task_id = "a43b5c6d-7e8f-901a-234b-567c890d1e2f"
headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}"
}

response = requests.get(
    f"https://api.meshy.ai/openapi/v1/resize/{task_id}",
    headers=headers,
)
response.raise_for_status()
print(response.json())
```

**Response**

```json
{
  "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
  "type": "resize",
  "model_urls": {
      "glb": "https://assets.meshy.ai/.../model.glb?Expires=..."
  },
  "progress": 100,
  "status": "SUCCEEDED",
  "created_at": 1699999999000,
  "started_at": 1700000000000,
  "finished_at": 1700000001000,
  "task_error": null,
  "consumed_credits": 1
}
```

---

## DELETE /openapi/v1/resize/:id -- Delete a Resize task

Permanently deletes a Resize task, including its models and data. You can't undo a delete.

### Path parameters

  - `id` · *path*

  The ID of the task to delete.

### Task status
Deleting a `PENDING` task refunds the credits it used when you created it.

An `IN_PROGRESS` task can't be deleted. The request returns `409 Conflict`,
and the task keeps running. Meshy doesn't refund a task that has started,
so deleting it would cost you both the credits and the result. Wait for it
to reach `SUCCEEDED`, `FAILED`, or `CANCELED`, then delete it.

Deleting a task in a final status (`SUCCEEDED`, `FAILED`, or `CANCELED`)
doesn't refund its credits.

### Returns
`200 OK` when the task is deleted, or `409 Conflict` when the task is
`IN_PROGRESS`.

```bash
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/resize/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
  -H "Authorization: Bearer ${YOUR_API_KEY}"
```

```javascript
import axios from 'axios'

const taskId = 'a43b5c6d-7e8f-901a-234b-567c890d1e2f'
const headers = { Authorization: `Bearer ${YOUR_API_KEY}` }

try {
  await axios.delete(
    `https://api.meshy.ai/openapi/v1/resize/${taskId}`,
    { headers }
  )
} catch (error) {
  console.error(error)
}
```

```python
import requests

task_id = "a43b5c6d-7e8f-901a-234b-567c890d1e2f"
headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}"
}

response = requests.delete(
    f"https://api.meshy.ai/openapi/v1/resize/{task_id}",
    headers=headers,
)
response.raise_for_status()
```

**Response**

```json
// 200 OK on success, with an empty body.
//
// 409 Conflict when the task is IN_PROGRESS. The task keeps running:
{
  "message": "Task is IN_PROGRESS and cannot be deleted. Credits for a task the worker has already started are not refundable; wait for it to reach SUCCEEDED, FAILED or CANCELED, then delete it."
}
```

---

## GET /openapi/v1/resize -- List Resize tasks

Returns a list of your Resize tasks.

### Parameters

  - `page_num` · *integer* · default: `1`

  The page number to return, up to `255`. A larger value returns `400`.

  - `page_size` · *integer* · default: `10`

  The number of tasks per page, up to `100`.

  - `sort_by` · *string*

  The sort order.

  Available values:
  * `+created_at`: oldest first
  * `-created_at`: newest first

### Returns

A paginated list of [Resize task objects](#the-resize-task-object).

```bash
curl https://api.meshy.ai/openapi/v1/resize?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
```

```javascript
import axios from 'axios'

const headers = { Authorization: `Bearer ${YOUR_API_KEY}` };

try {
 const response = await axios.get(
   `https://api.meshy.ai/openapi/v1/resize?page_size=10`,
   { headers }
 );
 console.log(response.data);
} catch (error) {
 console.error(error);
}
```

```python
import requests

headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}"
}

response = requests.get(
    "https://api.meshy.ai/openapi/v1/resize",
    headers=headers,
    params={"page_size": 10}
)
response.raise_for_status()
print(response.json())
```

**Response**

```json
[
  {
    "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
    "type": "resize",
    "model_urls": {
      "glb": "https://assets.meshy.ai/.../model.glb?Expires=..."
    },
    "progress": 100,
    "status": "SUCCEEDED",
    "created_at": 1699999999000,
    "started_at": 1700000000000,
    "finished_at": 1700000001000,
    "task_error": null,
    "consumed_credits": 1
  }
]
```

---

## GET /openapi/v1/resize/:id/stream -- Stream a Resize task

Streams a Resize task's updates as Server-Sent Events (SSE).

### Parameters

  - `id` · *path*

  The task ID from the create response.

### Returns
A stream of [Resize task objects](#the-resize-task-object) as Server-Sent Events.

Each event holds the full task object, in the same shape the Get endpoint returns. While the task is `PENDING` or `IN_PROGRESS`, its result fields don't have values yet.

```bash
curl -N https://api.meshy.ai/openapi/v1/resize/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"
```

```javascript
const response = await fetch(
  'https://api.meshy.ai/openapi/v1/resize/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream',
  {
    headers: { Authorization: `Bearer ${YOUR_API_KEY}` }
  }
);

const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';

while (true) {
  const { done, value } = await reader.read();
  if (done) break;

  buffer += decoder.decode(value, { stream: true });
  const lines = buffer.split('\n');
  buffer = lines.pop();

  for (const line of lines) {
    if (line.startsWith('data:')) {
      const data = JSON.parse(line.slice(5));
      console.log(data);

      if (['SUCCEEDED', 'FAILED', 'CANCELED'].includes(data.status)) {
        reader.cancel();
      }
    }
  }
}
```

```python
import requests
import json

headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}",
    "Accept": "text/event-stream"
}

response = requests.get(
    'https://api.meshy.ai/openapi/v1/resize/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream',
    headers=headers,
    stream=True
)

for line in response.iter_lines():
    if line:
        if line.startswith(b'data:'):
            data = json.loads(line.decode('utf-8')[5:])
            print(data)

            if data['status'] in ['SUCCEEDED', 'FAILED', 'CANCELED']:
                break

response.close()
```

**Response Stream**

```javascript
// Message event examples illustrate task progress.
event: message
data: {
  "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
  "type": "resize",
  "model_urls": {
    "glb": "https://assets.meshy.ai/.../model.glb?Expires=..."
  },
  "progress": 100,
  "status": "SUCCEEDED",
  "created_at": 1699999999000,
  "started_at": 1700000000000,
  "finished_at": 1700000001000,
  "task_error": null,
  "consumed_credits": 1
}
```

---

## The Resize task object
A Resize task object describes one resize of a 3D model. It holds the status, the progress, and the model file when the task succeeds.

### Properties

  - `id` · *string*

  The task ID. Treat it as an opaque string, and don't rely on its format.

  - `type` · *string*

  The task type, always `resize`.

  - `model_urls` · *object*

  Download URL for the resized model file. For `input_task_id`, the file is always GLB. For `model_url`, a GLB, OBJ, FBX, or STL file keeps its format, and a `.gltf` file or a data URI comes back as GLB.

  - `progress` · *integer*

  How much of the task is done, as a percentage. It's `0` until the task starts and `100` when it succeeds.

  - `status` · *string*

  The task status, one of `PENDING`, `IN_PROGRESS`, `SUCCEEDED`, `FAILED`, or `CANCELED`.

  - `preceding_tasks` · *integer*

  The number of tasks ahead of this one in the queue. The value is meaningful only while the task is `PENDING`.

  - `created_at` · *timestamp*

  Time the task was created, in Unix milliseconds.

  - `started_at` · *timestamp*

  Time the task started, in Unix milliseconds. It's `0` until the task starts.

  - `finished_at` · *timestamp*

  Time the task finished, in Unix milliseconds. It's `0` until the task finishes.

  - `expires_at` · *timestamp*

  Time the task's download URLs expire, in Unix milliseconds. It's `0` until the task finishes.

  - `texture_urls` · *array*

  Download URLs for the model's texture maps, when the task succeeds: an array of objects, one per texture set. Each object has a `base_color` URL, and can also have `metallic`, `roughness`, `normal`, `emission`, and `metallic_roughness` URLs. It's `null` until the task succeeds, and an empty array when the model has no texture maps.

  - `task_error` · *object*

  The error details when the task fails. See [Errors](/api/errors#task-errors).

  - `consumed_credits` · *integer*

  The number of credits the task used, which is `1` for a Resize task. It's `0` for a `FAILED` task.
