跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

venice-image-edit

Transform existing images with Venice. Covers POST /image/edit (prompt-driven single-image edit), /image/multi-edit (compose multiple images), /image/upscale (2x or 4x upscale), and /image/background-remove. Accepts base64, file upload, or HTTPS URL.

veniceai · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add veniceai/skills --skill venice-image-edit

技能说明


name: venice-image-edit description: Transform existing images with Venice. Covers POST /image/edit (prompt-driven single-image edit), /image/multi-edit (compose multiple images), /image/upscale (2x or 4x upscale), and /image/background-remove. Accepts base64, file upload, or HTTPS URL.

Venice Image Editing

Four endpoints, all operating on existing images:

EndpointPurpose
POST /image/editTransform one image with a text prompt.
POST /image/multi-editComposite / layer several images with a single prompt. Also has a multipart/form-data variant.
POST /image/upscaleUpscale 2× or 4×.
POST /image/background-removeProduce a transparent cutout.

For text-to-image generation, see venice-image-generate.

Shared rules

  • Input image accepts base64 string, file upload (multipart for /image/multi-edit), or HTTPS URL (for edit + multi-edit + background-remove).
  • File size < 25 MB. Image dimensions must be between 65,536 (256×256 equivalent) and 33,177,600 pixels (~5,761×5,761). Upscale caps at 16,777,216 pixels after scaling.
  • HTTPS URLs must be publicly reachable from Venice's network.
  • All four endpoints return the image as binary, never JSON. There is no return_binary field on edit / multi-edit / upscale / background-remove (that flag only exists on /image/generate). /image/edit and /image/multi-edit return image/png, image/jpeg, or image/webp depending on output_format; /image/upscale and /image/background-remove always return image/png.

/image/edit

Edit one image with a short, descriptive prompt.

curl https://api.venice.ai/api/v1/image/edit \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "firered-image-edit",
    "prompt": "Change the color of the sky to a sunrise",
    "image": "iVBORw0KGgoAAAANSUhEUg...",
    "aspect_ratio": "16:9",
    "safe_mode": true
  }'
FieldNotes
modelDefault firered-image-edit. See GET /models?type=inpaint for edit-capable models. modelId is accepted for backwards compatibility but deprecated on /image/edit — prefer model.
promptRequired, ≤ 32 768 chars (usually 1500 is plenty). Short & specific works best.
imageRequired. Base64 string, file upload, or https:// URL.
aspect_ratioOptional: auto, 1:1, 3:2, 16:9, 21:9, 9:16, 2:3, 3:4, 4:5. Supported values vary per model — check constraints on GET /models.
resolutionOptional tier, e.g. "1K", "2K", "4K". Defaults to "1K". Supported values vary per model.
output_formatOptional jpeg | png | webp. When omitted, inferred from resolution: PNG for 1K, JPEG for 2K/4K.
enhance_promptOptional bool, default false. Rewrites your prompt against the input image before editing. Costs extra credits and adds up to ~30 s. The rewritten prompt comes back URL-encoded in the x-venice-enhanced-prompt response header.
disable_prompt_optimization_thinkingOptional bool. Skips the model's prompt-optimization thinking step for speed. Only honored by models with supportsOptimizePromptThinking; ignored elsewhere.
safe_modeDefault true; blurs adult content.

Good prompts: "remove the tree", "add sunglasses to the cat", "make the sky a vivid orange sunrise".

Edit-capable model IDs change often. Read them from GET /models?type=inpaint rather than pinning a literal, and note that older IDs like qwen-edit have been retired in favor of qwen-image-2-edit and friends.

/image/multi-edit

Combine several images into one with a prompt. The first image is the base; the rest are layers / masks / references. The minimum is 1 image and the maximum is model-specific — read capabilities.maxInputImages from GET /models.

Field name: /image/multi-edit takes modelId, not model. This is the only image endpoint that uses modelId as the primary field name.

JSON (base64 or URLs)

{
  "modelId": "firered-image-edit",
  "prompt": "Place the person from image 2 onto the beach in image 1",
  "images": [
    "https://example.com/beach.jpg",
    "data:image/png;base64,iVBOR..."
  ],
  "safe_mode": true
}

Multipart (file upload)

POST /image/multi-edit
Content-Type: multipart/form-data

--boundary
Content-Disposition: form-data; name="modelId"

firered-image-edit
--boundary
Content-Disposition: form-data; name="prompt"

Place the person from image 2 onto the beach in image 1
--boundary
Content-Disposition: form-data; name="images"; filename="base.jpg"
Content-Type: image/jpeg

<bytes>
--boundary
Content-Disposition: form-data; name="images"; filename="subject.png"
Content-Type: image/png

<bytes>
--boundary--
FieldNotes
modelIdRequired field name (multi-edit does not accept model). Default firered-image-edit.
promptRequired, ≤ 32 768 chars.
imagesRequired. Minimum 1; maximum is model-specific (capabilities.maxInputImages). JSON variant accepts base64 or HTTPS URLs; multipart variant accepts raw file parts.
aspect_ratioOptional; inferred from the first image when set to auto or omitted.
resolutionOptional tier, e.g. "1K", "2K", "4K". Defaults to "1K".
output_formatOptional jpeg | png | webp. Inferred from resolution when omitted.
qualityOptional low | medium | high for models that support it (e.g. GPT Image 2). Higher values can raise the charge.
enhance_promptOptional bool, default false. Same behavior and x-venice-enhanced-prompt header as /image/edit.
disable_prompt_optimization_thinkingOptional bool.
safe_modeDefault true.

/image/upscale

Upscale 2× or 4×. This endpoint has three fields.

Breaking change: /image/upscale no longer ac

阅读完整来源 ↗