Seedream 이미지 작업 생성
CometAPI를 통해 비동기 Seedream 이미지 작업을 제출하고, 폴링에 사용할 반환된 작업 ID를 저장합니다.
POST /v1/images/generations에서 async: true를 사용하세요.
이 비동기 워크플로는 다음 모델 ID에 적용됩니다:
/v1/models를 조회하세요. 공급자 파라미터 세부 정보는 BytePlus의 이미지 생성 API 및 Seedream 4.0-5.0 튜토리얼.
작업 제출
model, prompt 및 async: true를 전송하세요. 예제에서는 2K 및 watermark: false를 사용하여 URL 응답도 요청합니다. 지원되는 크기는 모델 ID에 따라 다르므로 선택한 모델에서 지원하는 크기를 사용하세요.
생성 응답은 작업이 대기 중인 동안 data.task_id, data.status 및 빈 data.data 배열을 반환합니다. data.task_id을 저장하세요. 최상위 응답 코드를 작업 식별자로 사용하지 마세요.
작업 폴링
저장된 작업 ID를 다음에 전달하세요 Seedream 이미지 작업 조회.data.status 값이 pending인 동안 계속 폴링하세요. success 또는 failure가 되면 중지하세요.
이미지 URL 읽기
인증
Bearer token authentication. Use your CometAPI key.
본문
Seedream model ID. This async workflow is documented for doubao-seedream-4-0-250828, doubao-seedream-4-5-251128, doubao-seedream-5-0-260128, and seedream-5-0-pro-260628. Query /v1/models or open the Models page for account availability.
"doubao-seedream-5-0-260128"
Text prompt describing the image to generate.
"A clean studio photograph of a small red ceramic teapot on a pale blue table, soft window light, no text."
Asynchronous task mode. Set this to true, store data.task_id, and poll the task endpoint.
Requested output size. Use a value supported by the selected model.
"2K"
Response workflow for this async request. The example uses url and retrieves the URL from the completed task.
"url"
Whether to request a visible watermark on the generated image.
false