编辑图像(qwen-image-edit)

post/v1/images/edits

百炼qwen-image系列图片生成

鉴权

把 OLETOKEN 的 API Key 作为 Bearer Token 放进 Authorization 请求头。密钥在控制台的「API 密钥」页创建。

Authorization: Bearer $OLETOKEN_API_KEY

请求体

Content-Type:application/json

字段类型必填说明
modelstring—
inputobject—
messagesobject[]—
rolestring——
contentobject[]——
imagestring——
textstring——
parametersobject——
ninteger——
negative_promptstring——
prompt_extendboolean——
watermarkboolean——
sizestring——

响应

200成功生成图像

字段类型必填说明
createdinteger——
dataobject[]——
urlstring——
b64_jsonstring——
revised_promptstring——

请求示例

curl -X POST 'https://api.oletoken.ai/v1/images/edits' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "string",
    "input": {}
  }'