lowpoly retires Oct 30, 2026. meshy-7 for 3D generation retires Dec 31, 2026; as a texture model it stays available. Please switch models before these dates to avoid request errors. See all deprecations

Migrate to API v2

Use one response shape, one set of task routes, and one error format for every task type. Every v2 endpoint is under https://api.meshy.ai/openapi/v2/. This guide shows what changes and how to move your code.

Start with Changes in v2, which compares v1 and v2 for each change. Then move your code with your AI coding agent, as in Migrate with an AI agent, or by hand, as in Migrate step by step.

Creative Lab endpoints aren't part of v2, so your Creative Lab calls stay on v1. If you get Creative Lab results through webhooks, see the Creative Lab note in Move your webhooks to v2.

API v1 is deprecated. Plan your move around these dates:

  • January 15, 2027: API v1 gets no new features after this date.
  • March 15, 2027: every v1 endpoint that has a v2 version stops working.

Changes in v2

Pick a change to compare v1 and v2. The examples are shortened. For the details of each change, see the v2 migration reference.

Task readsBreaking

On v2, you read every task type except Creative Lab through /openapi/v2/tasks. Routes such as GET /openapi/v2/image-to-3d/{id} don't exist.

v1Before
GET    /openapi/v1/image-to-3d/{id}
GET    /openapi/v1/image-to-3d
GET    /openapi/v1/image-to-3d/{id}/stream
DELETE /openapi/v1/image-to-3d/{id}
v2After
GET    /openapi/v2/tasks/{id}
GET    /openapi/v2/tasks?type=image-to-3d
GET    /openapi/v2/tasks/{id}/stream
DELETE /openapi/v2/tasks/{id}

Details in the reference

1 / 18

Migrate with an AI agent

The Meshy migration skill gives your coding agent the rules for this migration and every v1 to v2 mapping. It works with Claude Code, Codex, Cursor, GitHub Copilot, and other agents that can read files in your project.

If you're an AI agent helping with this migration:

  • Ask your user before you download the skill from https://docs.meshy.ai/downloads/meshy-v2-migration.zip. If they agree, unzip it in the project's root folder, and follow meshy-v2-migration/SKILL.md before you change any code.
  • Without the skill, show your plan and wait for approval before you change any code. Keep the v1 code behind a switch that defaults to v1, and don't call the Meshy API.
  1. Download the skill, and unzip it in your project's root folder.

    Download skill

    The skill is a set of Markdown files and one read-only Python script that makes no network calls. Don't commit its meshy-v2-migration folder.

  2. Open your coding agent in the project, on a new branch.

  3. Paste this prompt.

    Use the skill in meshy-v2-migration/SKILL.md to migrate this project's
    Meshy API calls from v1 to v2. Follow its phases: show me the inventory
    and the plan first, and wait for my approval before you change anything.
    

The skill tells the agent to:

  • Find your Meshy calls, show you a plan, and wait for your approval before it edits code.
  • Add the v2 calls next to your v1 code, behind a switch that starts on v1.

Cloud agents, such as Codex cloud and the Copilot coding agent, stop after the plan. To approve it, reply in the same task or pull request.

Some steps need you, because the agent can't change your Meshy account settings or deploy your code. When it finishes, it gives you these steps:

  1. Review and merge the changes, then deploy them. Your app keeps calling v1.
  2. If you receive webhooks, switch each webhook to v2 on the Webhooks page. With a team API key, only the team owner can see and switch the team's webhooks.
  3. Try v2 with a few real tasks, then set the switch to v2.
  4. Delete the meshy-v2-migration folder.
  5. Later, remove the v1 code and the switch.

Migrate step by step

Before you change any code, we strongly recommend trying v2 with your API key to get familiar with it. Create a task with POST /openapi/v2/<endpoint>, and read it with GET /openapi/v2/tasks/{id}.

Build the v2 calls next to your v1 code, behind one switch that starts on v1. Then test v2 with real tasks, switch all your traffic at once, and switch back if anything looks wrong.

Add a switch

Add the v2 calls next to your v1 code, and choose between them with one switch, such as a MESHY_API_VERSION environment variable set to v1. Your app keeps calling v1 until you set the switch to v2. Leave Creative Lab calls out of the switch, because they stay on v1.

Add the switch

import os

# Which Meshy API version to call. Set MESHY_API_VERSION=v2 to switch.
API_VERSION = os.environ.get("MESHY_API_VERSION", "v1")

Add v2 task reads

For each v1 call that gets, lists, streams, or deletes a task, add a v2 version next to it. This includes Text to 3D reads on /openapi/v2/text-to-3d/{id}. The v2 versions use the v2 task routes and read the results from output.

The following code has a polling function and an example that uses the switch from Add a switch to pick v1 or v2. The polling function works for every task type except Creative Lab.

Poll a task on v2

import os
import time
import requests

headers = {"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"}

# Waits for a task to finish on v2. Works for every task type except Creative Lab.
def wait_for_task(task_id):
    while True:
        # v1: one route per endpoint, such as /openapi/v1/image-to-3d/{task_id}
        response = requests.get(f"https://api.meshy.ai/openapi/v2/tasks/{task_id}", headers=headers)
        response.raise_for_status()
        task = response.json()
        if task["status"] in ("SUCCEEDED", "FAILED", "CANCELED"):
            return task
        time.sleep(int(response.headers.get("Retry-After", 5)))

# Example: read a task's result, with v1 and v2 side by side.
if API_VERSION == "v2":
    task = wait_for_task(task_id)
    if task["status"] == "SUCCEEDED":
        glb_url = task["output"]["model_urls"]["glb"]  # v1: task["model_urls"]["glb"]
    elif task["status"] == "FAILED":
        print(task["task_error"]["message"])
else:
    ...  # your current v1 code

Response fields lists every field that moved. If you save Meshy responses and read them later, make your code handle both the v1 and v2 shapes.

Add v2 create calls

For each create call, add a v2 version next to the v1 one. It calls /openapi/v2/ instead of /openapi/v1/, and reads the task ID from id. Add v2 versions of your balance, usage, and animation library calls the same way.

In each v2 create call, change the parameters listed for that endpoint in Request parameters. Most requests need a change from at least one of these tabs in Changes in v2:

  • GLB-only default
  • Unknown parameters
  • Texture model
  • Other breaking changes

For example, this v2 Image to 3D request keeps the 4K textures a v1 request got with "hd_texture": true, names the texture model v1 used, and asks for the formats it needs. The comments show what each line replaces.

Create an Image to 3D task on v2

# Example: create an Image to 3D task, with v1 and v2 side by side.
if API_VERSION == "v2":
    response = requests.post(
        "https://api.meshy.ai/openapi/v2/image-to-3d",  # v1: /openapi/v1/image-to-3d
        headers=headers,
        json={
            "image_url": "https://docs.meshy.ai/images/api/quick-start/source-photo.webp",
            "should_texture": True,
            "texture_model": "meshy-7",  # v1: picked from ai_model (latest, so Meshy 7)
            "texture_resolution": "4k",  # v1: "hd_texture": True
            "target_formats": ["glb", "fbx"],  # v1 returned five formats by default; on v2, list the ones you need
        },
    )
    response.raise_for_status()
    task_id = response.json()["id"]  # v1: response.json()["result"]
else:
    ...  # your current v1 call

Move your webhooks to v2

If you use webhooks, follow this step. If not, skip to Move your API calls to v2.

Your webhook stays on v1 until you switch it at the end of this step. Every delivery names its version in the Meshy-Webhook-Version header. Deliveries for tasks created with a team API key go to the team owner's webhooks, so the team owner signs in to test and switch them.

Update your webhook code

Make the code behind your webhook URL accept both versions by branching on the header:

  • v2: the body is the v2 task object.
  • v1: the body is the v1 body you handle today.

Branch on the webhook version

@app.post("/meshy-webhook")
def meshy_webhook():
    task = request.get_json()
    if request.headers.get("Meshy-Webhook-Version") == "v2":
        handle_v2(task)  # results under task["output"]
    else:
        handle_v1(task)  # your current code
    return "", 200

Test your v2 webhook code

  1. Deploy your updated code. Its v1 branch is the code you run today.
  2. On the Webhooks page, edit your webhook and set Payload version to v2. Don't save yet.
  3. Under Test before saving, pick a task that succeeded and click Send test.
  4. Check that your server answered without an error and that your code took the v2 branch.
Send test
Set Payload version to v2, pick a task, and click Send test. Open What we sent to see the exact request.
The Edit Webhook dialog with Payload version set to v2. Send test delivered a task, and the result shows status 200 and the response body from the server.
Result
What we sent, opened under the result, showing the request headers with Meshy-Webhook-Test: true and the start of the v2 task object
What we sent

A test is a real delivery of that task with one extra header, Meshy-Webhook-Test: true. When it's there, skip paid follow-up work, such as a Retexture you start after an Image to 3D task.

Send test needs a URL that's reachable from the internet. To test code on your computer, forward a public URL to it as in Forwarding Webhooks for Local Testing.

Switch your webhook to v2

When your tests pass, click Save with Payload version set to v2. Your webhook then gets v2 deliveries for every task except Creative Lab, while your create calls stay on v1 until you move your API calls to v2.

  • To switch back, set Payload version to v1.
  • Switching doesn't resend past deliveries. Read any you missed with GET /openapi/v2/tasks/{id}.

For the payload details, see Webhook payloads.

Move your API calls to v2

When your v2 code passes your tests, and your webhooks are on v2 if you use them, move your traffic:

  1. Try v2 with a few real tasks in a test environment. Set the switch to v2 there, and run each of your flows. Compare the results with what you get on v1, including the files and formats, the fields your code reads, and the model size. These tasks use credits.

  2. Set the switch to v2 in production. Your app then calls v2 for every Meshy API except Creative Lab. To go back, set the switch to v1.

    MESHY_API_VERSION=v2
    
  3. When v2 has run well for a while, remove the v1 code and the switch. Your migration is done.