Endpoints
Edit images
Edit an existing image with POST /v1/images/edits.
POST
编辑图像
Edit an existing image with a text prompt. Submit the request as
multipart/form-data with the source file in the image field.
The snippets below are complete requests. Set
HILINKUP_API_KEY to your real key first, and replace model with an image model ID returned by GET /v1/models that supports editing.Request parameters
string
required
An image model ID that supports editing. Not every generation model supports edits.
string
required
A text description of the requested change. The more specific the prompt, the more reliably the source image is preserved.
file
required
The source image file. Supported formats and size limits depend on the model.
integer
default:"1"
Number of images to generate. Some models only support
1.string
Output image size. Valid values depend on the model.
Request examples
Response
integer
Unix timestamp of the generation result.
array
List of image results. Each item contains
url or b64_json.The response may return a temporary URL or Base64 data, usually in a
b64_json field. Download and store the result before the URL expires.Saving the result
Stating what must stay unchanged (background, composition, subject features) usually reduces unintended edits, but how closely a model follows this varies.
Next steps
To create a new image from text only, use Generate images.Authorizations
在控制台创建的 API Key,格式为 Authorization: Bearer HILINKUP_API_KEY。
Body
multipart/form-data
Last modified on October 8, 2026