> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Meshy 7 with Comfy Router

> Call meshy/meshy-7 through Comfy Router: endpoint, request shape and the response Router returns.

API Reference for `meshy/meshy-7`, served by Comfy Router from Meshy.

## Quick start

Create a key in [your Comfy workspace](https://platform.comfy.org/profile/api-keys) and export it as `COMFY_API_KEY`. The Python and TypeScript snippets use the Comfy SDKs (`pip install comfy-sdk`, `npm install @comfyorg/sdk`); the cURL snippet is the same call over raw HTTP.

**Model ID:** `meshy/meshy-7`

**Endpoint:** `POST https://api.comfy.org/v2/models/meshy/meshy-7`

<CodeGroup>
  ```python Python theme={null}
  from comfy_sdk import Comfy

  # Reads COMFY_API_KEY from the environment.
  # The SDK automatically creates an idempotency key and reuses it for automatic retries.
  with Comfy() as client:
      result = client.models.run(
          "meshy/meshy-7",
          {
              "art_style": "realistic",
              "mode": "preview",
              "prompt": "a red cube",
          },
      )

  print(result)
  ```

  ```typescript TypeScript theme={null}
  import { comfy } from "@comfyorg/sdk";

  // Reads COMFY_API_KEY from the environment.
  // The SDK automatically creates an idempotency key and reuses it for automatic retries.
  const { data } = await comfy.models.run("meshy/meshy-7", {
    art_style: "realistic",
    mode: "preview",
    prompt: "a red cube",
  });

  console.log(data);
  ```

  ```bash cURL theme={null}
  curl https://api.comfy.org/v2/models/meshy/meshy-7 \
    -H "X-API-Key: $COMFY_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d "{\"art_style\": \"realistic\", \"mode\": \"preview\", \"prompt\": \"a red cube\"}"
  ```
</CodeGroup>

## Schema

### Input

#### `preview` variant

<ParamField body="ai_model" type="string">
  The Meshy model to run. On the Comfy Router route this is supplied by the path (`/v2/models/meshy/{model}`) and may be omitted or sent as null; Router writes the path's model here after validation. On the v1 /proxy route see MeshyTextTo3DPreviewRequest, which constrains it to MeshyAiModel.
</ParamField>

<ParamField body="art_style" type="string" default="&#x22;realistic&#x22;">
  Describe your desired art style of the object.

  Possible values: `realistic`, `sculpture`
</ParamField>

<ParamField body="is_a_t_pose" type="boolean" default="false">
  Deprecated. Use pose\_mode instead. Whether to generate the model in an A/T pose.
</ParamField>

<ParamField body="mode" type="string" required>
  This field should be set to "preview" when creating a preview task.

  Possible values: `preview`
</ParamField>

<ParamField body="moderation" type="boolean" default="false">
  When true, input content will be screened for potentially harmful content.
</ParamField>

<ParamField body="pose_mode" type="string">
  Specify the pose mode for the generated model.

  Possible values: `a-pose`, `t-pose`, \`\`
</ParamField>

<ParamField body="prompt" type="string" required>
  Describe what kind of object the 3D model is. Maximum 600 characters.
</ParamField>

<ParamField body="should_remesh" type="boolean" default="true">
  Controls whether to enable the remesh phase. When false, returns highest-precision triangular mesh.
</ParamField>

<ParamField body="symmetry_mode" type="string" default="&#x22;auto&#x22;">
  Controls symmetry behavior during model generation.

  Possible values: `off`, `auto`, `on`
</ParamField>

<ParamField body="target_polycount" type="integer" default="30000">
  Specify the target number of polygons in the generated model. Valid range is 100 to 300,000.

  Range: `100` to `300000`
</ParamField>

<ParamField body="topology" type="string" default="&#x22;triangle&#x22;">
  Specify the topology of the generated model.

  Possible values: `quad`, `triangle`
</ParamField>

<ParamField body="ultra_mode" type="boolean" default="false">
  Enables Ultra generation for higher-fidelity geometry with finer surface detail. Only supported when ai\_model is meshy-7 or latest.
</ParamField>

#### `refine` variant

<ParamField body="ai_model" type="string">
  The Meshy model to run. On the Comfy Router route this is supplied by the path (`/v2/models/meshy/{model}`) and may be omitted or sent as null; Router writes the path's model here after validation. On the v1 /proxy route see MeshyTextTo3DRefineRequest, which constrains it to MeshyAiModel.
</ParamField>

<ParamField body="enable_pbr" type="boolean" default="false">
  Generate PBR Maps (metallic, roughness, normal) in addition to the base color. Note that enable\_pbr should be set to false when using Sculpture style.
</ParamField>

<ParamField body="mode" type="string" required>
  This field should be set to "refine" when creating a refine task.

  Possible values: `refine`
</ParamField>

<ParamField body="moderation" type="boolean" default="false">
  When true, input content will be screened for potentially harmful content.
</ParamField>

<ParamField body="preview_task_id" type="string" required>
  The corresponding preview task id. The status of the given preview task must be SUCCEEDED.
</ParamField>

<ParamField body="texture_image_url" type="string">
  Provide a 2d image to guide the texturing process. Supports .jpg, .jpeg, .png formats or base64-encoded data URI.
</ParamField>

<ParamField body="texture_prompt" type="string">
  Provide an additional text prompt to guide the texturing process. Maximum 600 characters.
</ParamField>

<ParamField body="texture_resolution" type="string" default="&#x22;2k&#x22;">
  Texture resolution of the generated textures. One of 2k, 4k or 8k. 4k and 8k require ai\_model meshy-6, meshy-7 or latest.

  Possible values: `2k`, `4k`, `8k`
</ParamField>

Generated from the schema Router serves at `GET /v2/models/meshy/meshy-7/openapi.json`, the same document it validates a call against before the request reaches the provider.

### Output

<ResponseField name="art_style" type="string">
  The unmodified art\_style that was used to create the preview task.
</ResponseField>

<ResponseField name="created_at" type="integer">
  Timestamp of when the task was created, in milliseconds.

  Format: `int64`
</ResponseField>

<ResponseField name="finished_at" type="integer">
  Timestamp of when the task was finished, in milliseconds. 0 if not finished.

  Format: `int64`
</ResponseField>

<ResponseField name="id" type="string" required>
  Unique identifier for the task.
</ResponseField>

<ResponseField name="model_urls" type="object">
  Downloadable URLs to the textured 3D model files generated by Meshy.
</ResponseField>

<ResponseField name="model_urls.fbx" type="string">
  Downloadable URL to the FBX file.
</ResponseField>

<ResponseField name="model_urls.glb" type="string">
  Downloadable URL to the GLB file.
</ResponseField>

<ResponseField name="model_urls.mtl" type="string">
  Downloadable URL to the MTL file.
</ResponseField>

<ResponseField name="model_urls.obj" type="string">
  Downloadable URL to the OBJ file.
</ResponseField>

<ResponseField name="model_urls.usdz" type="string">
  Downloadable URL to the USDZ file.
</ResponseField>

<ResponseField name="negative_prompt" type="string">
  Deprecated field maintained for backward compatibility.
</ResponseField>

<ResponseField name="preceding_tasks" type="integer">
  The count of preceding tasks. Only meaningful when status is PENDING.
</ResponseField>

<ResponseField name="progress" type="integer">
  Progress of the task. 0 if not started, 100 when succeeded.

  Range: `0` to `100`
</ResponseField>

<ResponseField name="prompt" type="string">
  The unmodified prompt that was used to create the task.
</ResponseField>

<ResponseField name="started_at" type="integer">
  Timestamp of when the task was started, in milliseconds. 0 if not started.

  Format: `int64`
</ResponseField>

<ResponseField name="status" type="string" required>
  Possible values: `SUCCEEDED`
</ResponseField>

<ResponseField name="task_error" type="object">
  Error object that contains the error message if the task failed.
</ResponseField>

<ResponseField name="task_error.message" type="string">
  Detailed error message.
</ResponseField>

<ResponseField name="texture_image_url" type="string">
  Downloadable URL to the texture image that was used to guide the texturing process.
</ResponseField>

<ResponseField name="texture_prompt" type="string">
  Additional text prompt provided to guide the texturing process during the refine stage.
</ResponseField>

<ResponseField name="texture_richness" type="string">
  Deprecated field maintained for backward compatibility.
</ResponseField>

<ResponseField name="texture_urls" type="object[]">
  An array of texture URL objects that are generated from the task.
</ResponseField>

<ResponseField name="texture_urls[].base_color" type="string">
  Downloadable URL to the base color map image.
</ResponseField>

<ResponseField name="texture_urls[].metallic" type="string">
  Downloadable URL to the metallic map image.
</ResponseField>

<ResponseField name="texture_urls[].normal" type="string">
  Downloadable URL to the normal map image.
</ResponseField>

<ResponseField name="texture_urls[].roughness" type="string">
  Downloadable URL to the roughness map image.
</ResponseField>

<ResponseField name="thumbnail_url" type="string">
  Downloadable URL to the thumbnail image of the model file.
</ResponseField>

<ResponseField name="type" type="string">
  Type of the Text to 3D task.

  Possible values: `text-to-3d-preview`, `text-to-3d-refine`
</ResponseField>

<ResponseField name="video_url" type="string">
  Deprecated field returning the downloadable URL to the preview video.
</ResponseField>

## Examples

### Input

```json theme={null}
{
  "art_style": "realistic",
  "mode": "preview",
  "prompt": "a red cube"
}
```

### Output

```json theme={null}
{
  "art_style": "realistic",
  "created_at": 1767225600000,
  "finished_at": 1767225719000,
  "id": "018f2c7a-4b1e-7c3d-9a05-6e2f8b41d0c9",
  "model_urls": {
    "fbx": "https://example.invalid/meshy/text-to-3d/model.fbx",
    "glb": "https://example.invalid/meshy/text-to-3d/model.glb",
    "mtl": "https://example.invalid/meshy/text-to-3d/model.mtl",
    "obj": "https://example.invalid/meshy/text-to-3d/model.obj",
    "usdz": "https://example.invalid/meshy/text-to-3d/model.usdz"
  },
  "progress": 100,
  "prompt": "a red cube",
  "started_at": 1767225601000,
  "status": "SUCCEEDED",
  "thumbnail_url": "https://example.invalid/meshy/text-to-3d/thumbnail.png",
  "type": "text-to-3d-preview"
}
```

## Before you ship

The SDKs create an `Idempotency-Key` and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes.

When a request fails, Router sends an `X-Comfy-Error-Type` response header explaining why. A `422` means Router rejected the input before calling the provider. Download generated assets promptly because [result URLs can expire](/development/comfy-router/reference#result-assets).

<CardGroup cols={3}>
  <Card title="Headers" icon="list" href="/development/comfy-router/headers">
    Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
  </Card>

  <Card title="Using the Router API" icon="code" href="/development/comfy-router/api">
    Model discovery, validation errors, retries, and billing.
  </Card>

  <Card title="Limitations" icon="triangle-exclamation" href="/development/comfy-router/limitations">
    What Router does not do today, and what to use instead.
  </Card>
</CardGroup>
