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

# Comfy Router에서 Seed 2.0 Lite 260228 사용하기

> Comfy Router를 통해 byteplus/seed-2-0-lite-260228을 호출하는 방법: 엔드포인트, 요청 형태, Router가 반환하는 응답을 설명합니다.

`byteplus/seed-2-0-lite-260228`에 대한 API 레퍼런스로, BytePlus에서 제공하고 Comfy Router가 서빙합니다.

## 빠른 시작

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

**모델 ID:** `byteplus/seed-2-0-lite-260228`

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

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

      # 환경에서 COMFY_API_KEY를 읽습니다.
      # SDK는 자동으로 idempotency key를 생성하고 자동 재시도에 재사용합니다.
      with Comfy() as client:
          result = client.models.run(
              "byteplus/seed-2-0-lite-260228",
              {
                  "input": "Reply with the single word: ok",
              },
          )

      print(result)
      ```

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

      // 환경에서 COMFY_API_KEY를 읽습니다.
      // SDK는 자동으로 idempotency key를 생성하고 자동 재시도에 재사용합니다.
      const { data } = await comfy.models.run("byteplus/seed-2-0-lite-260228", {
        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-lite-260228 \
        -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="대기열에 넣고 나중에 수집">
    동일한 본문을 `POST https://api.comfy.org/v2/models/byteplus/seed-2-0-lite-260228/requests`로 보냅니다. Router는 실행이 접수되는 즉시 `request_id`와 함께 `201`로 응답하며, 결과는 준비되는 대로 이 프로세스나 다른 프로세스에서 수집할 수 있습니다. 상태, 취소, 수집 방법은 [대기열 전송](/ko/development/comfy-router/queue)에서 자세히 설명합니다.

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

      # 환경에서 COMFY_API_KEY를 읽습니다.
      # 각 submit() 호출은 자체 Idempotency-Key를 생성하고 자동 재시도에 재사용합니다.
      async def main():
          async with AsyncComfy() as client:
              handle = await client.models.submit(
                  "byteplus/seed-2-0-lite-260228",
                  {
                      "input": "Reply with the single word: ok",
                  },
              )
              print("request_id:", handle.request_id)  # 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

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

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

          print(result)

      asyncio.run(main())
      ```

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

      // 환경에서 COMFY_API_KEY를 읽습니다.
      // 각 submit() 호출은 자체 Idempotency-Key를 생성하고 자동 재시도에 재사용합니다.
      const handle = await comfy.models.submit("byteplus/seed-2-0-lite-260228", {
        input: "Reply with the single word: ok",
      });
      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);
      ```

      ```bash cURL theme={null}
      # 1. 제출합니다. Router는 request_id, status_url, response_url, cancel_url과 함께 201로 응답합니다.
      curl https://api.comfy.org/v2/models/byteplus/seed-2-0-lite-260228/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. 상태가 COMPLETED가 될 때까지 폴링하며, 각 응답이 지정한 Retry-After 초만큼 기다립니다.
      REQUEST_ID="<request_id from the 201 body>"
      curl -i https://api.comfy.org/v2/models/byteplus/seed-2-0-lite-260228/requests/$REQUEST_ID/status \
        -H "X-API-Key: $COMFY_API_KEY"

      # 3. 수집합니다. 200은 모델의 네이티브 출력이고, 아직 실행 중이면 202와 상태 본문입니다.
      curl https://api.comfy.org/v2/models/byteplus/seed-2-0-lite-260228/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">
  true이면 공용 프리픽스 캐시만 생성하며, 모델은 응답하지 않습니다.
</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`(수동 멀티턴 재사용을 위한 암호화+압축 reasoning).
</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">
  true이면 응답이 저장되고 멀티턴 사용을 위해 ID로 조회할 수 있습니다.
</ParamField>

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

  형식: `float`
</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`

  형식: `float`
</ParamField>

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

### 출력

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

이 페이지는 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>
