> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-willie-des-1087-router-migration-block.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy Router에서 Seed 2.0 Pro 260328 사용하기

> Comfy Router를 통해 byteplus/seed-2-0-pro-260328을 호출합니다: 엔드포인트, 요청 형태, 그리고 Router가 반환하는 응답.

BytePlus에서 Comfy Router가 제공하는 `byteplus/seed-2-0-pro-260328`의 API 레퍼런스입니다.

## 빠른 시작

[Comfy 워크스페이스](https://platform.comfy.org/profile/api-keys)에서 키를 생성하고 `COMFY_API_KEY`로 내보내세요. Python 및 TypeScript 스니펫은 Comfy SDK(`pip install comfy-sdk`, `npm install @comfyorg/sdk`)를 사용하며, cURL 스니펫은 동일한 호출을 raw HTTP로 수행한 것입니다.

**모델 ID:** `byteplus/seed-2-0-pro-260328`

**엔드포인트:** `POST https://api.comfy.org/v2/models/byteplus/seed-2-0-pro-260328`

<Tabs>
  <Tab title="Wait for the result">
    <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(
              "byteplus/seed-2-0-pro-260328",
              {
                  "input": "Reply with the single word: ok",
              },
          )

      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("byteplus/seed-2-0-pro-260328", {
        input: "Reply with the single word: ok",
      });

      console.log(data);
      ```

      ```bash cURL theme={null}
      curl https://api.comfy.org/v2/models/byteplus/seed-2-0-pro-260328 \
        -H "X-API-Key: $COMFY_API_KEY" \
        -H "Idempotency-Key: $(uuidgen)" \
        -H "Content-Type: application/json" \
        -d "{\"input\": \"Reply with the single word: ok\"}"
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Queue and collect later">
    <CodeGroup>
      ```python Python theme={null}
      from comfy_sdk import Comfy

      # Reads COMFY_API_KEY from the environment.
      # Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
      with Comfy() as client:
          handle = client.models.submit(
              "byteplus/seed-2-0-pro-260328",
              {
                  "input": "Reply with the single word: ok",
              },
          )
          print("request_id:", handle.request_id)  # with the model ID, all another process needs

          # Poll until the request completes, waiting the Retry-After the server names.
          for update in handle.iter_events():
              print(update.status, update.queue_position)

          # The provider's own payload, the same value models.run() returns.
          # A request that failed or was cancelled raises the typed Router error here.
          result = handle.get()

      print(result)
      ```

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

      // Reads COMFY_API_KEY from the environment.
      // Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
      const handle = await comfy.models.submit("byteplus/seed-2-0-pro-260328", {
        input: "Reply with the single word: ok",
      });
      console.log("requestId:", handle.requestId); // with the model ID, all another process needs

      // Poll until the request completes, waiting the Retry-After the server names.
      for await (const update of handle.events()) {
        console.log(update.status, update.queuePosition);
      }

      // The same result models.run() returns. A request that failed or was cancelled rejects here.
      const result = await handle.get();

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

      ```bash cURL theme={null}
      # 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.
      curl https://api.comfy.org/v2/models/byteplus/seed-2-0-pro-260328/requests \
        -H "X-API-Key: $COMFY_API_KEY" \
        -H "Idempotency-Key: $(uuidgen)" \
        -H "Content-Type: application/json" \
        -d "{\"input\": \"Reply with the single word: ok\"}"

      # 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.
      REQUEST_ID="<request_id from the 201 body>"
      curl -i https://api.comfy.org/v2/models/byteplus/seed-2-0-pro-260328/requests/$REQUEST_ID/status \
        -H "X-API-Key: $COMFY_API_KEY"

      # 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.
      curl https://api.comfy.org/v2/models/byteplus/seed-2-0-pro-260328/requests/$REQUEST_ID \
        -H "X-API-Key: $COMFY_API_KEY"
      ```
    </CodeGroup>
  </Tab>
</Tabs>

## 스키마

### 입력

<ParamField body="caching" type="object">
  컨텍스트 캐시 구성입니다.
</ParamField>

<ParamField body="caching.prefix" type="boolean" default="false">
  참인 경우 공개 접두사 캐시만 생성하고 모델은 응답하지 않습니다.
</ParamField>

<ParamField body="caching.type" type="string">
  가능한 값: `enabled`, `disabled`
</ParamField>

<ParamField body="context_management" type="object">
  컨텍스트 창을 관리 가능한 크기로 유지하기 위해 적용되는 컨텍스트 관리 전략(`clear_thinking`, `clear_tool_uses`)입니다.
</ParamField>

<ParamField body="context_management.edits" type="object[]">
  `type`으로 구분되는 단일 컨텍스트 편집 전략입니다.
</ParamField>

<ParamField body="expire_at" type="integer">
  저장된 응답과 캐시가 만료되는 Unix 타임스탬프(초, UTC)입니다. 범위: (creation\_time, creation\_time + 604800]. 기본값: creation\_time + 259200(3일).
</ParamField>

<ParamField body="include" type="string[]">
  포함할 추가 출력 필드입니다. 현재 지원: `reasoning.encrypted_content`(수동 다중 턴 재사용을 위한 암호화+압축된 추론).
</ParamField>

<ParamField body="input" type="string | object[]" required>
  모델에 제공되는 텍스트 콘텐츠 또는 입력 항목 목록입니다.
</ParamField>

<ParamField body="instructions" type="string">
  첫 번째 지시로 앞에 추가되는 시스템/개발자 메시지입니다. `caching`과 호환되지 않습니다. `caching.type`이 `enabled`인 경우 `instructions`를 설정하면 오류가 반환됩니다.
</ParamField>

<ParamField body="max_output_tokens" type="integer">
  최대 출력 토큰 수(응답 + 사고 사슬)입니다.
</ParamField>

<ParamField body="max_tool_calls" type="integer">
  범위: `1` \~ `10`
</ParamField>

<ParamField body="model" type="string">
  모델 ID 또는 엔드포인트 ID입니다. 모델 목록은 [https://docs.byteplus.com/en/docs/ModelArk/1330310](https://docs.byteplus.com/en/docs/ModelArk/1330310), 엔드포인트 ID는 [https://docs.byteplus.com/en/docs/ModelArk/1099522를](https://docs.byteplus.com/en/docs/ModelArk/1099522를) 참조하십시오. POST /proxy/byteplus/api/v3/responses에 대한 직접 v1 호출은 반드시 이 값을 제공해야 하며, 프록시는 자체 허용 목록에 없는 값은 거부하고 값을 생략한 경우에도 400으로 거부합니다. Comfy Router 입력 스키마의 `required` 목록에는 없는 이유는 Router가 /v2/models/byteplus/\{model}의 `{model}` 경로 세그먼트에서 이 값을 채우므로 Router 호출자는 이를 생략하기 때문입니다.
</ParamField>

<ParamField body="previous_response_id" type="string">
  이전 응답의 ID로, 다중 턴 대화를 계속하는 데 사용됩니다. 실패를 방지하려면 요청 사이에 약 100ms를 삽입하십시오.
</ParamField>

<ParamField body="reasoning" type="object">
  깊은 사고의 작업량을 제한합니다.
</ParamField>

<ParamField body="reasoning.effort" type="string">
  `minimal`은 사고를 완전히 비활성화합니다. `thinking.type =
    disabled`인 경우 `minimal`만 허용됩니다.

  가능한 값: `minimal`, `low`, `medium`, `high`
</ParamField>

<ParamField body="store" type="boolean" default="true">
  참인 경우 응답이 저장되고 다중 턴 사용을 위해 ID로 검색할 수 있습니다.
</ParamField>

<ParamField body="temperature" type="number" default="1">
  범위: `0` \~ `2`

  형식: `실수`
</ParamField>

<ParamField body="text" type="object">
  출력 형식 구성입니다.
</ParamField>

<ParamField body="text.format" type="object">
  `type`으로 구분되는 텍스트 출력 형식입니다. `text`는 자연어를 반환하고, `json_object`는 자유 형식 JSON 객체를 반환하며, `json_schema`는 출력을 호출자가 제공한 JSON Schema로 제한합니다.
</ParamField>

<ParamField body="thinking" type="object">
  깊은 사고 모드를 제어합니다.
</ParamField>

<ParamField body="thinking.type" type="string">
  `enabled`: 응답하기 전에 항상 추론합니다.
  `disabled`: 추가 추론 없이 응답합니다.
  `auto`: 모델이 쿼리별로 결정합니다.

  가능한 값: `enabled`, `disabled`, `auto`
</ParamField>

<ParamField body="tool_choice" type="`none`, `auto`, `required` | object">
  도구 선택 모드입니다. seed-1-6 모델만 이 필드를 지원합니다.
</ParamField>

<ParamField body="tools" type="object[]">
  모델이 호출할 수 있는 도구입니다. 현재 `function`만 지원됩니다.
</ParamField>

<ParamField body="tools[].description" type="string" />

<ParamField body="tools[].name" type="string" required />

<ParamField body="tools[].parameters" type="object" required>
  함수의 파라미터를 설명하는 JSON Schema입니다.
</ParamField>

<ParamField body="tools[].type" type="string" required default="&#x22;function&#x22;">
  가능한 값: `function`
</ParamField>

<ParamField body="top_p" type="number" default="0.7">
  범위: `0` \~ `1`

  형식: `실수`
</ParamField>

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

### 출력

<ResponseField name="caching" type="object" />

<ResponseField name="caching.prefix" type="boolean" />

<ResponseField name="caching.type" type="string">
  사용 가능한 값: `enabled`, `disabled`
</ResponseField>

<ResponseField name="context_management" type="object">
  이 응답에서 실제로 적용된 컨텍스트 관리 전략입니다. 전략을 구성하는 요청 측 `BytePlusResponseContextManagement`와 달리, 여기에는 서버가 호출한 전략과 삭제된 항목의 개수가 그대로 반영됩니다.
</ResponseField>

<ResponseField name="context_management.applied_edits" type="object[]">
  `type`으로 구분되는, 적용된 컨텍스트 편집 하나입니다.
</ResponseField>

<ResponseField name="created_at" type="integer" required>
  응답이 생성된 Unix 타임스탬프(초)입니다.
</ResponseField>

<ResponseField name="error" type="object">
  오류 세부 정보입니다. 응답이 성공하면 null입니다.
</ResponseField>

<ResponseField name="error.code" type="string" required />

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

<ResponseField name="expire_at" type="integer">
  저장된 응답이 만료되는 Unix 타임스탬프(초)입니다.
</ResponseField>

<ResponseField name="id" type="string" required>
  응답의 고유 ID입니다. 대화를 계속하려면 `previous_response_id`로 사용하세요.
</ResponseField>

<ResponseField name="incomplete_details" type="object">
  `status`가 `incomplete`일 때 채워집니다.
</ResponseField>

<ResponseField name="incomplete_details.reason" type="string">
  예: `max_output_tokens`, `content_filter`.
</ResponseField>

<ResponseField name="instructions" type="string">
  요청의 `instructions` 필드를 그대로 반영한 값입니다.
</ResponseField>

<ResponseField name="max_output_tokens" type="integer" />

<ResponseField name="max_tool_calls" type="integer" />

<ResponseField name="metadata" type="object" />

<ResponseField name="model" type="string" required>
  응답을 생성한 모델 ID입니다.
</ResponseField>

<ResponseField name="object" type="string" required default="&#x22;response&#x22;">
  사용 가능한 값: `response`
</ResponseField>

<ResponseField name="output" type="object[]" required>
  모델이 생성한 순서대로 나열된 출력 항목입니다.
</ResponseField>

<ResponseField name="previous_response_id" type="string" />

<ResponseField name="reasoning" type="object" />

<ResponseField name="reasoning.effort" type="string">
  사용 가능한 값: `minimal`, `low`, `medium`, `high`
</ResponseField>

<ResponseField name="service_tier" type="string">
  TPM 보장 패키지 사용량입니다. `default`는 사용하지 않음을 의미합니다.

  사용 가능한 값: `default`
</ResponseField>

<ResponseField name="status" type="string" required>
  사용 가능한 값: `in_progress`, `completed`, `incomplete`, `failed`, `cancelled`
</ResponseField>

<ResponseField name="store" type="boolean" />

<ResponseField name="stream" type="boolean" />

<ResponseField name="temperature" type="number">
  형식: `float`
</ResponseField>

<ResponseField name="text" type="object">
  요청의 `text` 필드를 그대로 반영한 값입니다.
</ResponseField>

<ResponseField name="text.format" type="object">
  `type`으로 구분되는 텍스트 출력 형식입니다. `text`는 자연어를 반환하고, `json_object`는 자유 형식 JSON 객체를 반환하며, `json_schema`는 호출자가 제공한 JSON Schema로 출력을 제한합니다.
</ResponseField>

<ResponseField name="thinking" type="object" />

<ResponseField name="thinking.type" type="string">
  사용 가능한 값: `enabled`, `disabled`, `auto`
</ResponseField>

<ResponseField name="tool_choice" type="`none`, `auto`, `required` | object" />

<ResponseField name="tools" type="object[]">
  모델이 호출할 수 있는 도구입니다. 현재는 `function`만 지원됩니다.
</ResponseField>

<ResponseField name="tools[].description" type="string" />

<ResponseField name="tools[].name" type="string" required />

<ResponseField name="tools[].parameters" type="object" required>
  함수의 파라미터를 설명하는 JSON Schema입니다.
</ResponseField>

<ResponseField name="tools[].type" type="string" required default="&#x22;function&#x22;">
  사용 가능한 값: `function`
</ResponseField>

<ResponseField name="top_p" type="number">
  형식: `float`
</ResponseField>

<ResponseField name="usage" type="object">
  청구 및 관측을 위한 토큰 사용량 내역입니다.
</ResponseField>

<ResponseField name="usage.input_tokens" type="integer" required>
  요청의 총 토큰 수입니다.
</ResponseField>

<ResponseField name="usage.input_tokens_details" type="object">
  입력 토큰의 내역입니다(캐시 적중 등).
</ResponseField>

<ResponseField name="usage.input_tokens_details.cached_tokens" type="integer">
  컨텍스트 캐시에서 제공된 토큰입니다.
</ResponseField>

<ResponseField name="usage.output_tokens" type="integer" required>
  모델이 생성한 총 토큰 수입니다.
</ResponseField>

<ResponseField name="usage.output_tokens_details" type="object">
  출력 토큰의 내역입니다(추론 등).
</ResponseField>

<ResponseField name="usage.output_tokens_details.reasoning_tokens" type="integer">
  사고 연쇄(chain-of-thought)에 소비된 토큰입니다.
</ResponseField>

<ResponseField name="usage.tool_usage" type="object">
  도구별 호출 횟수입니다.
</ResponseField>

<ResponseField name="usage.tool_usage.image_process" type="integer">
  이미지 처리 도구 호출 횟수입니다.
</ResponseField>

<ResponseField name="usage.tool_usage.mcp" type="integer">
  MCP 도구 호출 횟수입니다.
</ResponseField>

<ResponseField name="usage.tool_usage.web_search" type="integer">
  웹 검색 도구 호출 횟수입니다.
</ResponseField>

<ResponseField name="usage.tool_usage_details" type="object">
  하위 도구 호출 횟수의 도구별 내역입니다.
</ResponseField>

<ResponseField name="usage.tool_usage_details.image_process" type="object">
  예: `{"zoom":1,"point":1,"grounding":1}`.
</ResponseField>

<ResponseField name="usage.tool_usage_details.mcp" type="object">
  예: `{"mcp_server_tos":1,"mcp_server_tls":1}`.
</ResponseField>

<ResponseField name="usage.tool_usage_details.web_search" type="object">
  예: `{"toutiao":1,"moji":1,"search_engine":1}`.
</ResponseField>

<ResponseField name="usage.total_tokens" type="integer" required>
  input\_tokens + output\_tokens.
</ResponseField>

## 예제

### 입력

```json theme={null}
{
  "input": "Reply with the single word: ok"
}
```

### 출력

```json theme={null}
{
  "created_at": 1767225600,
  "id": "resp_0a1b2c3d4e5f6a7b8c9d0e1f",
  "model": "seed-2-0-pro-260328",
  "object": "response",
  "output": [
    {
      "content": [
        {
          "annotations": [],
          "text": "ok",
          "type": "output_text"
        }
      ],
      "id": "msg_0a1b2c3d4e5f6a7b8c9d0e1f",
      "role": "assistant",
      "status": "completed",
      "type": "message"
    }
  ],
  "status": "completed",
  "usage": {
    "input_tokens": 14,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 2,
    "total_tokens": 16
  }
}
```

## 배포 전 확인

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)를 참고하세요.

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