> ## 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.

# Comfy Router로 Meshy 7.1 사용하기

> Comfy Router를 통해 meshy/meshy-7.1을 호출하는 방법: endpoint, 요청 형태, 그리고 Router가 반환하는 응답을 설명합니다.

Meshy가 Comfy Router를 통해 제공하는 `meshy/meshy-7.1`의 API 레퍼런스입니다.

## 빠른 시작

[Comfy 워크스페이스](https://platform.comfy.org/profile/api-keys?onboarding=router)에서 키를 생성하고 `COMFY_API_KEY`로 내보내세요. Python, TypeScript, Swift 스니펫은 Comfy SDK(`pip install comfy-sdk`, `npm install @comfyorg/sdk`, 그리고 [`ComfySwiftSDK`](https://github.com/Comfy-Org/comfy-swift-sdk) Swift 패키지)를 사용하며, cURL 스니펫은 동일한 호출을 raw HTTP로 보낸 것입니다.

**모델 ID:** `meshy/meshy-7.1`

**엔드포인트:** `POST https://api.comfy.org/v2/models/meshy/meshy-7.1`

<Tabs>
  <Tab title="결과를 기다리기">
    <CodeGroup>
      ```python Python theme={null}
      from comfy_sdk import Comfy

      # 환경 변수에서 COMFY_API_KEY를 읽습니다.
      # SDK는 멱등성 키를 자동으로 생성하고 자동 재시도에 재사용합니다.
      with Comfy() as client:
          result = client.models.run(
              "meshy/meshy-7.1",
              {
                  "art_style": "realistic",
                  "mode": "preview",
                  "prompt": "a red cube",
              },
          )

      print(result)
      ```

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

      // 환경 변수에서 COMFY_API_KEY를 읽습니다.
      // SDK는 멱등성 키를 자동으로 생성하고 자동 재시도에 재사용합니다.
      const { data } = await comfy.models.run("meshy/meshy-7.1", {
        art_style: "realistic",
        mode: "preview",
        prompt: "a red cube",
      });

      console.log(data);
      ```

      ```swift Swift theme={null}
      import Foundation
      import ComfySwiftSDK

      // 환경 변수에서 COMFY_API_KEY를 읽습니다.
      // SDK는 호출마다 멱등성 키를 발급하고 자동 재시도에 재사용합니다.
      let client = ComfyCloudClient(apiKey: ProcessInfo.processInfo.environment["COMFY_API_KEY"]!)
      let result = try await client.models.run(
          "meshy/meshy-7.1",
          input: [
              "art_style": "realistic",
              "mode": "preview",
              "prompt": "a red cube",
          ]
      )

      print(result.output)
      ```

      ```bash cURL theme={null}
      curl https://api.comfy.org/v2/models/meshy/meshy-7.1 \
        -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>
  </Tab>

  <Tab title="실행 대기열에 넣고 나중에 수집">
    동일한 본문을 `POST https://api.comfy.org/v2/models/meshy/meshy-7.1/requests`로 보냅니다. Router는 실행이 접수되는 즉시 `request_id`와 함께 `201`로 응답하며, 결과는 준비가 완료되면 이 프로세스 또는 다른 프로세스에서 수집합니다. [실행 대기열 전송](/ko/development/comfy-router/queue)에서 상태, 취소, 수집 과정을 안내합니다.

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

      # 환경 변수에서 COMFY_API_KEY를 읽습니다.
      # 각 submit() 호출은 자체 Idempotency-Key를 발급하고 자동 재시도에 재사용합니다.
      with Comfy() as client:
          handle = client.models.submit(
              "meshy/meshy-7.1",
              {
                  "art_style": "realistic",
                  "mode": "preview",
                  "prompt": "a red cube",
              },
          )
          print("request_id:", handle.request_id)  # 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

          # 서버가 지정한 Retry-After만큼 대기하며 요청이 완료될 때까지 폴링합니다.
          for update in handle.iter_events():
              print(update.status, update.queue_position)

          # 공급자 자체의 페이로드로, models.run()이 반환하는 것과 동일한 값입니다.
          # 실패하거나 취소된 요청은 여기에서 타입이 지정된 Router 오류를 발생시킵니다.
          result = handle.get()

      print(result)
      ```

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

      // 환경 변수에서 COMFY_API_KEY를 읽습니다.
      // 각 submit() 호출은 자체 Idempotency-Key를 발급하고 자동 재시도에 재사용합니다.
      const handle = await comfy.models.submit("meshy/meshy-7.1", {
        art_style: "realistic",
        mode: "preview",
        prompt: "a red cube",
      });
      console.log("requestId:", handle.requestId); // 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

      // 서버가 지정한 Retry-After만큼 대기하며 요청이 완료될 때까지 폴링합니다.
      for await (const update of handle.events()) {
        console.log(update.status, update.queuePosition);
      }

      // models.run()이 반환하는 것과 동일한 결과입니다. 실패하거나 취소된 요청은 여기에서 거부됩니다.
      const result = await handle.get();

      console.log(result.data);
      ```

      ```swift Swift theme={null}
      import Foundation
      import ComfySwiftSDK

      // 환경 변수에서 COMFY_API_KEY를 읽습니다.
      // 각 submit() 호출은 자체 Idempotency-Key를 발급하고 자동 재시도에 재사용합니다.
      let client = ComfyCloudClient(apiKey: ProcessInfo.processInfo.environment["COMFY_API_KEY"]!)
      let handle = try await client.models.submit(
          "meshy/meshy-7.1",
          input: [
              "art_style": "realistic",
              "mode": "preview",
              "prompt": "a red cube",
          ]
      )
      print("requestId:", handle.requestId)  // 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

      // 서버가 지정한 Retry-After만큼 대기하며 요청이 완료될 때까지 폴링합니다.
      for try await update in handle.events() {
          print(update.state.rawValue, update.queuePosition.map(String.init) ?? "unknown")
      }

      // 공급자 자체의 페이로드로, models.run()이 반환하는 것과 동일한 값입니다.
      // 실패하거나 취소된 요청은 여기에서 타입이 지정된 Router 오류를 던집니다.
      let result = try await handle.result()

      print(result.output)
      ```

      ```bash cURL theme={null}
      # 1. 제출합니다. Router는 request_id, status_url, response_url, cancel_url과 함께 201로 응답합니다.
      curl https://api.comfy.org/v2/models/meshy/meshy-7.1/requests \
        -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\"}"

      # 2. 상태가 COMPLETED가 될 때까지 폴링하며, 각 응답이 지정하는 Retry-After 초만큼 대기합니다.
      REQUEST_ID="<request_id from the 201 body>"
      curl -i https://api.comfy.org/v2/models/meshy/meshy-7.1/requests/$REQUEST_ID/status \
        -H "X-API-Key: $COMFY_API_KEY"

      # 3. 수집합니다. 모델의 네이티브 출력과 함께 200, 아직 실행 중이면 상태 본문과 함께 202를 반환합니다.
      curl https://api.comfy.org/v2/models/meshy/meshy-7.1/requests/$REQUEST_ID \
        -H "X-API-Key: $COMFY_API_KEY"
      ```
    </CodeGroup>
  </Tab>
</Tabs>

## 스키마

### 입력

#### `preview` 변형

<ParamField body="ai_model" type="string">
  실행할 Meshy 모델입니다. Comfy Router 라우트에서는 경로(`/v2/models/meshy/{model}`)로 제공되며 생략하거나 null로 보낼 수 있습니다. Router는 검증 이후 경로의 모델을 여기에 기록합니다. v1 /proxy 라우트에서는 MeshyTextTo3DPreviewRequest를 참조하세요. 이는 이를 MeshyAiModel로 제한합니다.
</ParamField>

<ParamField body="art_style" type="string" default="&#x22;realistic&#x22;">
  원하는 오브젝트의 아트 스타일을 설명하세요.

  가능한 값: `realistic`, `sculpture`
</ParamField>

<ParamField body="geometry_resolution" type="string" default="&#x22;standard&#x22;">
  생성된 메시의 지오메트리 해상도입니다. 2k와 4k는 더 세밀한 표면 디테일을 위해 Ultra 패스를 실행합니다. 2k는 ai\_model이 meshy-7, meshy-7.1 또는 latest여야 하고, 4k는 meshy-7.1 또는 latest여야 합니다.

  가능한 값: `standard`, `2k`, `4k`
</ParamField>

<ParamField body="is_a_t_pose" type="boolean" default="false">
  지원 중단됨. 대신 pose\_mode를 사용하세요. 모델을 A/T 포즈로 생성할지 여부입니다.
</ParamField>

<ParamField body="mode" type="string" required>
  미리보기 작업을 생성할 때 이 필드는 "preview"로 설정해야 합니다.

  가능한 값: `preview`
</ParamField>

<ParamField body="moderation" type="boolean" default="false">
  참일 때 입력 콘텐츠는 잠재적으로 유해한 콘텐츠가 있는지 검사됩니다.
</ParamField>

<ParamField body="pose_mode" type="string">
  생성된 모델의 포즈 모드를 지정합니다.

  가능한 값: `a-pose`, `t-pose`, \`\`
</ParamField>

<ParamField body="prompt" type="string" required>
  3D 모델이 어떤 종류의 오브젝트인지 설명하세요. 최대 600자입니다.
</ParamField>

<ParamField body="should_remesh" type="boolean" default="true">
  리메시 단계를 활성화할지 여부를 제어합니다. false이면 최고 정밀도의 삼각 메시를 반환합니다.
</ParamField>

<ParamField body="symmetry_mode" type="string" default="&#x22;auto&#x22;">
  모델 생성 중 대칭 동작을 제어합니다.

  가능한 값: `off`, `auto`, `on`
</ParamField>

<ParamField body="target_polycount" type="integer" default="30000">
  생성된 모델의 목표 폴리곤 수를 지정합니다. 유효 범위는 100에서 300,000입니다.

  범위: `100` \~ `300000`
</ParamField>

<ParamField body="topology" type="string" default="&#x22;triangle&#x22;">
  생성된 모델의 토폴로지를 지정합니다.

  가능한 값: `quad`, `triangle`
</ParamField>

<ParamField body="ultra_mode" type="boolean" default="false">
  지원 중단됨. 대신 geometry\_resolution을 사용하세요. 참은 geometry\_resolution 2k와 동일합니다. ai\_model이 meshy-7, meshy-7.1 또는 latest인 경우에만 지원됩니다.
</ParamField>

#### `refine` 변형

<ParamField body="ai_model" type="string">
  실행할 Meshy 모델입니다. Comfy Router 라우트에서는 경로(`/v2/models/meshy/{model}`)로 제공되며 생략하거나 null로 보낼 수 있습니다. Router는 검증 이후 경로의 모델을 여기에 기록합니다. v1 /proxy 라우트에서는 MeshyTextTo3DRefineRequest를 참조하세요. 이는 이를 MeshyAiModel로 제한합니다.
</ParamField>

<ParamField body="enable_pbr" type="boolean" default="false">
  기본 색상 외에 PBR 맵(메탈릭, 러프니스, 노멀(normal))을 생성합니다. Sculpture 스타일을 사용할 때는 enable\_pbr을 false로 설정해야 합니다.
</ParamField>

<ParamField body="mode" type="string" required>
  refine 작업을 생성할 때 이 필드는 "refine"으로 설정해야 합니다.

  가능한 값: `refine`
</ParamField>

<ParamField body="moderation" type="boolean" default="false">
  참일 때 입력 콘텐츠는 잠재적으로 유해한 콘텐츠가 있는지 검사됩니다.
</ParamField>

<ParamField body="preview_task_id" type="string" required>
  해당 미리보기 작업 ID입니다. 지정된 미리보기 작업의 상태가 SUCCEEDED여야 합니다.
</ParamField>

<ParamField body="texture_image_url" type="string">
  텍스처링 과정을 안내할 2D 이미지를 제공하세요. .jpg, .jpeg, .png 형식 또는 base64로 인코딩된 데이터 URI를 지원합니다.
</ParamField>

<ParamField body="texture_prompt" type="string">
  텍스처링 과정을 안내할 추가 텍스트 프롬프트를 제공하세요. 최대 600자입니다.
</ParamField>

<ParamField body="texture_resolution" type="string" default="&#x22;2k&#x22;">
  생성된 텍스처의 텍스처 해상도입니다. 2k, 4k 또는 8k 중 하나입니다. 4k와 8k는 ai\_model이 meshy-6, meshy-7, meshy-7.1 또는 latest여야 합니다.

  가능한 값: `2k`, `4k`, `8k`
</ParamField>

`GET /v2/models/meshy/meshy-7.1/openapi.json`에서 Router가 제공하는 스키마에서 생성되었으며, 이는 요청이 공급자에게 도달하기 이전에 호출을 검증하는 데 사용하는 것과 동일한 문서입니다.

### 출력

<ResponseField name="art_style" type="string">
  미리보기 작업을 생성하는 데 사용된 수정되지 않은 art\_style입니다.
</ResponseField>

<ResponseField name="created_at" type="integer">
  작업이 생성된 시점의 타임스탬프(밀리초)입니다.

  형식: `int64`
</ResponseField>

<ResponseField name="finished_at" type="integer">
  작업이 완료된 시점의 타임스탬프(밀리초)입니다. 완료되지 않은 경우 0입니다.

  형식: `int64`
</ResponseField>

<ResponseField name="id" type="string" required>
  작업의 고유 식별자입니다.
</ResponseField>

<ResponseField name="model_urls" type="object">
  Meshy에서 생성된 텍스처가 적용된 3D 모델 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="model_urls.fbx" type="string">
  FBX 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="model_urls.glb" type="string">
  GLB 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="model_urls.mtl" type="string">
  MTL 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="model_urls.obj" type="string">
  OBJ 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="model_urls.usdz" type="string">
  USDZ 파일의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="negative_prompt" type="string">
  하위 호환성을 위해 유지되는 지원 중단된 필드입니다.
</ResponseField>

<ResponseField name="preceding_tasks" type="integer">
  선행 작업의 수입니다. status가 PENDING일 때만 의미가 있습니다.
</ResponseField>

<ResponseField name="progress" type="integer">
  작업의 진행률입니다. 시작되지 않은 경우 0, 성공한 경우 100입니다.

  범위: `0` \~ `100`
</ResponseField>

<ResponseField name="prompt" type="string">
  작업을 생성하는 데 사용된 수정되지 않은 프롬프트입니다.
</ResponseField>

<ResponseField name="started_at" type="integer">
  작업이 시작된 시점의 타임스탬프(밀리초)입니다. 시작되지 않은 경우 0입니다.

  형식: `int64`
</ResponseField>

<ResponseField name="status" type="string" required>
  가능한 값: `SUCCEEDED`
</ResponseField>

<ResponseField name="task_error" type="object">
  작업이 실패한 경우 오류 메시지를 포함하는 오류 객체입니다.
</ResponseField>

<ResponseField name="task_error.message" type="string">
  자세한 오류 메시지입니다.
</ResponseField>

<ResponseField name="texture_image_url" type="string">
  텍스처링 과정을 안내하는 데 사용된 텍스처 이미지의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="texture_prompt" type="string">
  refine 단계에서 텍스처링 과정을 안내하기 위해 제공되는 추가 텍스트 프롬프트입니다.
</ResponseField>

<ResponseField name="texture_richness" type="string">
  하위 호환성을 위해 유지되는 지원 중단된 필드입니다.
</ResponseField>

<ResponseField name="texture_urls" type="object[]">
  작업에서 생성된 텍스처 URL 객체의 배열입니다.
</ResponseField>

<ResponseField name="texture_urls[].base_color" type="string">
  베이스 색상 맵 이미지의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="texture_urls[].metallic" type="string">
  메탈릭 맵 이미지의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="texture_urls[].normal" type="string">
  노멀(normal) 맵 이미지의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="texture_urls[].roughness" type="string">
  러프니스 맵 이미지의 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="thumbnail_url" type="string">
  모델 파일의 썸네일 이미지에 대한 다운로드 가능한 URL입니다.
</ResponseField>

<ResponseField name="type" type="string">
  텍스트 기반 3D 생성 작업의 유형입니다.

  가능한 값: `text-to-3d-preview`, `text-to-3d-refine`
</ResponseField>

<ResponseField name="video_url" type="string">
  미리보기 비디오의 다운로드 가능한 URL을 반환하는 지원 중단된 필드입니다.
</ResponseField>

## 예시

### 입력

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

### 출력

```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"
}
```

## 배포 전 확인

SDK는 `Idempotency-Key`를 생성하고 자동 재시도에 재사용합니다. 수동으로 재시도할 때는 원본 키를 재사용하세요. Router는 연결을 최대 10분간 유지할 수 있습니다.

요청이 실패하면 Router는 그 이유를 설명하는 `X-Comfy-Error-Type` 응답 헤더를 보냅니다. `422`는 Router가 공급자를 호출하기 전에 입력을 거부했음을 의미하고, `413`은 요청 본문이 Router가 허용하는 크기보다 컸음을 의미합니다. [결과 URL이 만료](/ko/development/comfy-router/reference#결과-에셋)될 수 있으므로 생성된 에셋은 즉시 다운로드하세요.

위의 필드 설명에 명시된 크기 제한은 해당 필드에 대한 공급자 자체의 한도이며, 공급자 사양에서 인용한 것입니다. Router는 전체 요청 본문에 별도의 상한을 적용하며, base64로 인코딩된 미디어도 여기에 포함됩니다. [요청 본문 크기](/ko/development/comfy-router/limitations)를 참고하세요.

이 페이지는 Comfy Router를 통해 호출하는 하나의 파트너 모델을 설명합니다. 동일한 `comfy-sdk` / `@comfyorg/sdk` 패키지에는 Comfy Cloud에서 전체 ComfyUI 워크플로 그래프를 실행하기 위한 두 번째 클라이언트도 포함되어 있습니다: `Comfy(api_key=...)` / `new Comfy({ apiKey })`, 그리고 `client.workflows`, `client.assets`, `client.jobs`가 있습니다. [Comfy SDKs](/ko/development/api-development/sdks)를 참조하세요.

<CardGroup cols={3}>
  <Card title="헤더" icon="list" href="/ko/development/comfy-router/headers">
    인증, 멱등성, 요청 ID, 오류 분류, 재시도 간격, 지출 한도.
  </Card>

  <Card title="Router API 사용" icon="code" href="/ko/development/comfy-router/api">
    모델 검색, 검증 오류, 재시도, 과금.
  </Card>

  <Card title="제한 사항" icon="triangle-exclamation" href="/ko/development/comfy-router/limitations">
    Router가 현재 지원하지 않는 기능과 대신 사용할 방법.
  </Card>
</CardGroup>
