Skip to main content
POST
Image-to-Image Editing

이미지 편집

텍스트 지침이 포함된 Google Gemini 2.5 Flash 이미지를 사용하여 기존 이미지를 편집하세요.

엔드포인트

설명

텍스트 지침이 포함된 Google Gemini 2.5 Flash 이미지를 사용하여 기존 이미지를 편집하세요. 이 엔드포인트는 다음과 같은 경우에 이미지 간 편집을 위해 특별히 설계되었습니다.
  • 이미지 파일은 필수입니다(선택 사항인 /images/generations와 다름).
  • 이미지를 편집하거나 변환하는 방법을 설명하는 텍스트 프롬프트
  • 편집된 이미지는 동일한 품질 및 형식 옵션으로 반환됩니다.
모든 프롬프트와 응답은 감사 로깅 및 규정 준수를 위해 SMLTP를 통해 자동으로 처리됩니다.

인증

필수: API 키

요청 본문

이 끝점은 multipart/form-data 형식을 허용합니다.

매개변수

요청 예시

cURL

자바스크립트/Node.js

파이썬

응답

성공 응답 (200)

응답 필드

이미지 개체

메타데이터 개체

오류 응답

400 잘못된 요청

401 승인되지 않음

403 금지됨

413 페이로드가 너무 큼

500 내부 서버 오류

503 서비스를 사용할 수 없습니다.

메모

  • 지원되는 이미지 형식: JPEG, PNG, WEBP, GIF
  • 최대 파일 크기: 이미지당 10MB
  • 이 엔드포인트에는 이미지 파일이 필수입니다(/images/generations와 다름).
  • 프롬프트는 업로드된 이미지를 편집하거나 변환하는 방법을 설명합니다.
  • 모든 요청은 보안 및 규정 준수를 위해 SMLTP를 통해 처리됩니다.
  • URL 대신 base64로 인코딩된 이미지 데이터를 받으려면 response_format: "b64_json"를 사용하세요.

인증

Authorization
string
header
필수

API key authentication using Bearer token format. Example: Authorization: Bearer sk-your-api-key-here

본문

multipart/form-data
prompt
string
필수

Text instructions describing how to edit or transform the uploaded image

Required string length: 1 - 4000
예시:

"Add dramatic sunset colors to the sky and enhance the overall atmosphere"

image
file
필수

Image file to edit (required, JPEG, PNG, WEBP, or GIF, max 10MB)

smltp_policy
string
기본값:internal

SMLTP security policy to apply (e.g., 'internal', 'public', 'confidential', 'hipaa', 'gdpr')

예시:

"internal"

response_format
enum<string>
기본값:url

The format of the response images

사용 가능한 옵션:
url,
b64_json
예시:

"url"

응답

Image edited successfully

success
boolean
예시:

true

id
string

Unique request identifier

예시:

"f55bb4aa-ad9a-4b5a-9c94-511bf6fce806"

object
string
예시:

"image.edit"

created
integer

Unix timestamp of when the image was edited

예시:

1705312200

data
object[]

Array of edited images

metadata
object