curl --location --request POST 'https://llm-api.mmchat.xyz/v1/images/edits' \
--header 'Authorization: Bearer METACHAT_API_KEY' \
--form 'image=""' \
--form 'prompt="A cute baby sea otter wearing a beret."' \
--form 'n="1"' \
--form 'size="1024x1024"' \
--form 'output_format="png"' \
--form 'quality="auto"' \
--form 'background="auto"' \
--form 'output_compression="100"'
{
"created": 1713833628,
"data": [
{
"b64_json": "..."
}
],
"usage": {
"total_tokens": 100,
"input_tokens": 50,
"output_tokens": 50,
"input_tokens_details": {
"text_tokens": 10,
"image_tokens": 40
}
}
}
1024x1024
、1024x1536
、1536x1024
或 auto
(由模型自行决定),默认 auto
。png
, jpeg
或 webp
,默认 png
。high
、medium
、low
或 auto
,分别表示高、中、低画质和模型自行决定,画质越高,Tokens 消耗越多,默认 auto
。transparent
(透明), opaque
(不透明) 或 auto
(由模型自行决定),默认 auto
。output_format
为 jpeg
或 webp
时有效,必须为 0 - 100 整数,默认 100。