JL (#help): magpie_image through a Volcengine Ark provider came back
watermarked, edits went as a multipart form, and n and a ratio size
were sent as for OpenAI. Checked against Ark's own doc, 图片生成 API
(https://www.volcengine.com/docs/82379/1541523, read 2026-10-15):
- watermark is a boolean, default true ("AI 生成" in the corner);
- image is a string or string[], a URL or data:image/<fmt>;base64,...;
there is no edits endpoint, it goes to /images/generations;
- there is no n field (one image, or a group the model sizes itself
under sequential_image_generation, which 5.0 pro/flash refuse);
- size is a tier (1K/1.5K/2K/3K/4K by model) or WIDTHxHEIGHT; a ratio
is to be described in the prompt. The doc lists each ratio's 2K WxH;
4.0/4.5/5.0 lite's 2K table is inside every model's pixel range (5.0
pro's max 2048x2048x1.1025 too), so it is the one used;
- no quality, no mask; output_format png/jpeg and background
transparent exist (5.0 models) and are passed when asked.
drawArk (draw_volcengine.go), reached from drawImages for any
ark.*.volces.com base (the preset's plans or a pay-as-you-go provider
added by hand): JSON body with watermark false and b64_json, images in
image, one request per image through eachDrawing, a listed ratio sent
as its 2K size and any other ratio a 400 saying to put it in the
prompt or give WxH, before Ark is asked. A mask is a 400.
Not tried against the real Ark API (no Ark key here); the fake server
follows the doc's request and answer shapes.
Run (worktree at origin/main dd25997a4, go1.26.8, -tags nogui -p 1):
- go test -run 'TestArk|TestIsArk' ./internal/gateway: ok. With the
isArk branch in drawImages removed by hand: TestArkDrawsUnmarkedOncePerImage
(one image, no watermark field), TestArkEditSendsImagesAsJSON (404 at
/images/edits) and TestArkSizes (ratio sent, 200) red; restored, green.
- go test -run 'Image|Draw|Ark|ModelScope|Drawing|WorkBuddyDraw|Video'
./internal/gateway: ok (74.5s).
- go test -run TestLoopGuardLeavesOrdinaryRepliesAlone (reads the
docs): ok.
- gofmt -l internal/gateway: clean. go vet -tags nogui ./internal/gateway
for GOOS=darwin, linux, windows: clean.
- Not run: the full suite.
Full suite: SUITE_LINE