편집 (인페인트)
Edit or modify an image based on the supplied prompt. The image can be provided either as a multipart form-data file upload or as a base64-encoded string in a JSON request. For models with resolution tiers that require explicit dimensions, omit aspect_ratio or set it to auto to infer the closest supported aspect ratio from the input image; provide aspect_ratio directly when exact output dimensions are required. Use output_format to request jpeg, jpg, png, or webp output.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.
qwen-edit)은 편집당 $0.04입니다. 사용 가능한 모든 편집 모델과 가격은 모델 엔드포인트를 참조하세요.품질 등급
일부 편집 모델은 시각적 충실도와 비용 간의 균형을 맞추는 선택적quality 매개변수(low, medium, high)를 허용합니다. 현재 gpt-image-2-edit에서 지원되며, 다른 모델은 이 매개변수를 무시합니다.
quality를 생략하면 모델은 기본 등급(gpt-image-2-edit의 경우 high)을 사용합니다. 등급별 가격(1K/2K/4K × low/medium/high)은 모델 엔드포인트의 model_spec.pricing.quality 아래에 있으며 가격 개요에 나열되어 있습니다.
quality를 생략한 요청은 모델의 기본 등급(gpt-image-2-edit의 경우 high)으로 청구됩니다.Postman 컬렉션
추가 예제는 이 Postman 컬렉션을 참조하세요.인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
본문
Edit an image based on the supplied prompt.
The image to edit. Can be either a file upload, a base64-encoded string, or a URL starting with http:// or https://. Image dimensions must be at least 65536 pixels and must not exceed 33177600 pixels. File size must be less than 25MB.
The text directions to edit or modify the image. Short, descriptive prompts work best (e.g., "remove the tree", "change the sky to sunrise"). Character limit is model specific and is listed in the promptCharacterLimit setting in the model list endpoint.
1 - 32768"Change the color of the sky to a sunrise"
The aspect ratio for the output image. Use 'auto' or omit this parameter to infer the closest supported aspect ratio from the input image when explicit sizing is required by the model. Supported values vary by model - check GET /api/v1/models for model-specific options.
auto, 1:1, 3:2, 16:9, 21:9, 9:16, 2:3, 3:4, 4:5 "16:9"
Resolution tier for the output image (e.g. "1K", "2K", "4K"). Supported values vary by model - check GET /api/v1/models for model-specific options. Defaults to "1K" when not specified.
1 - 10"1K"
The model ID to use for image editing.
1Deprecated: Use "model" instead. The model ID to use for image editing.
firered-image-edit, qwen-edit, qwen-edit-uncensored, grok-imagine-edit, grok-imagine-quality-edit, qwen-image-2-edit, qwen-image-2-pro-edit, wan-2-7-pro-edit, flux-2-max-edit, gpt-image-2-edit, gpt-image-1-5-edit, nano-banana-2-edit, nano-banana-pro-edit, seedream-v5-lite-edit, seedream-v4-edit 1Output format for the edited image. Accepts jpeg, jpg, png, or webp. When omitted, the format is inferred from resolution: PNG for 1K edits and JPEG for 2K/4K edits.
jpeg, png, webp "png"
Whether to use safe mode. If enabled, this will blur images that are classified as having adult content.
false
응답
OK
The response is of type file.