LogoLogoAPI 문서
LogoLogoAPI 문서
홈페이지
개요인증과 멱등성이미지 생성이미지 편집이미지 변환작업과 제한 대기크레딧오류요청 제한과 동시 실행API 변경 내역
API 문서

이미지 편집

업로드한 이미지를 자연어 지시로 편집하기

POST /api/v1/images/edits는 multipart/form-data를 받습니다. 필요한 범위: images:edit.

폼 필드

필드타입필수기본값규칙
imagefile예—PNG, JPEG, WebP. 최대 10 MiB, 디코딩 후 4,000만 픽셀까지
promptstring예—편집 지시, 5~2,000자
aspect_ratiostring아니요원본에 따름생성과 동일한 공개 비율
resolutionstring아니요2K2K 또는 4K
countinteger아니요11~4

파일 시그니처는 선언된 MIME 타입과 별개로 검사합니다. 잘못됐거나 용량을 넘거나 안전하지 않은 이미지는 400 INVALID_REQUEST, 또는 같은 공개 코드와 함께 HTTP 413을 반환합니다.

크레딧

해상도출력 장당 크레딧
2K10
4K20

cURL

curl https://sci-draw.com/api/v1/images/edits \
  -H 'Authorization: Bearer sd_YOUR_KEY' \
  -H 'Idempotency-Key: revise-figure-7-v2' \
  -F 'image=@figure.png;type=image/png' \
  -F 'prompt=Move the legend below the diagram and increase label contrast' \
  -F 'resolution=2K' \
  -F 'count=1'

JavaScript

const form = new FormData();
form.set('image', file);
form.set('prompt', 'Move the legend below the diagram');
const response = await fetch('https://sci-draw.com/api/v1/images/edits', {
  method: 'POST',


Python

with open("figure.png", "rb") as image:
    response = requests.post(
        "https://sci-draw.com/api/v1/images/edits",
        headers={"Authorization": f"Bearer 


업로드한 원본은 작업의 비공개 입력이며, 작업이나 로그 응답에 절대 반환되지 않습니다. 멱등하게 중복 업로드된 파일은 폐기되고, 접수된 원본은 종료 상태의 결과가 나온 뒤 삭제됩니다.

이미지 생성

텍스트로 이미지를 만드는 작업 생성

이미지 변환

이미지를 SVG, PPTX, PNG, PDF, TIFF로 변환하기

목차

폼 필드
크레딧
cURL
JavaScript
Python
headers: { Authorization: `Bearer ${apiKey}`, 'Idempotency-Key': crypto.randomUUID() },
body: form,
});
{
api_key
}
"
,
"Idempotency-Key"
:
str
(uuid.uuid4())},
files={"image": ("figure.png", image, "image/png")},
data={"prompt": "Move the legend below the diagram"},
)