# Image Base URL `https://api.sniphunter.com` 图片处理、OCR、去水印与 AI 生图。 # Image ## POST /api/v1/image/ai/bg-remove Background Remove AI背景移除 支持自动识别前景并移除背景。 可选返回mask,支持边缘羽化。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackgroundRemoveRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackgroundRemoveResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/bg-remove/upload Background Remove Upload AI背景移除(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_background_remove_upload_api_v1_image_ai_bg_remove_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/colorize Colorize Photo 黑白照片上色 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ColorizeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/cutout Ai Cutout AI 抠图(同步 rembg;完整异步请用 /bg-remove) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AICutoutRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/enhance Image Enhance AI图像增强 自动/人脸/通用三种增强模式。 可调节锐化、降噪、色彩增强强度。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageEnhanceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageEnhanceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/enhance-clarity Enhance Clarity 清晰度增强 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClarityRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/enhance/upload Image Enhance Upload AI图像增强(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_image_enhance_upload_api_v1_image_ai_enhance_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/extend Image Extend AI图像扩展 (Outpainting) 支持向上/下/左/右/全方向扩展。 可自定义扩展比例,支持内容提示词引导生成。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageExtendRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageExtendResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/extend/upload Image Extend Upload AI图像扩展(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_image_extend_upload_api_v1_image_ai_extend_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/generate Image Generate 文生图(同步) GeekAI(quality=low,size 由调用方指定且 ≤1K,按 GPT-Image-2.5 约束修正)。 模型由请求 model 指定:gpt-image-2 / gpt-image-2.5-sunburst。 需登录;按 tool_type=image_generate 扣积分。 建议客户端超时 ≥300s。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/ai/history Get Task History 获取当前用户的任务历史 ```json { "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Type" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAITaskListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/lossless-zoom Lossless Zoom 无损放大 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LosslessZoomRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/object-remove Object Remove AI对象移除 (Inpainting) 通过mask标记要移除的区域,自动填充背景。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectRemoveRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectRemoveResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/object-remove/upload Object Remove Upload AI对象移除(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_object_remove_upload_api_v1_image_ai_object_remove_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/ocr Image Ocr Api 图片 OCR(第一推荐 GLM-OCR)。 文案工具「图片转文案」走 /copywriting/image-to-text,内部同样优先调用本能力。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageOcrRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/ai/ocr/models Image Ocr Models OCR 可选模型(业务传 model=glm-ocr|pp-ocrv5)。 ```json { "security": [ { "HTTPBearer": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## GET /api/v1/image/ai/ocr/status Image Ocr Status Api GLM-OCR 能力状态。 ```json { "security": [ { "HTTPBearer": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## POST /api/v1/image/ai/portrait-anime Portrait Animation 人像动漫化 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortraitAnimationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/recolor Image Recolor AI图像重着色 支持指定目标颜色,多种风格。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageRecolorRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageRecolorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/recolor/upload Image Recolor Upload AI图像重着色(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_image_recolor_upload_api_v1_image_ai_recolor_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/ai/status Get Ai Status 获取 AI 服务状态 ```json { "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## POST /api/v1/image/ai/style-transfer Style Transfer 风格转换(Media 预设;后续迁 Infer 真模型) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StyleTransferRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/ai/task/{task_id} Get Task 获取任务详情(仅任务所有者) ```json { "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAITaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/ai/task/{task_id}/progress Get Task Progress Sse 获取任务进度 (SSE);使用独立 DB session,避免长连接占用请求级会话。 ```json { "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/upscale Image Upscale AI图像放大 (Super Resolution) 支持2x/4x/8x放大,可选人脸增强。 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageUpscaleRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageUpscaleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/upscale/upload Image Upscale Upload AI图像放大(文件上传) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_image_upscale_upload_api_v1_image_ai_upscale_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageAIUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/ai/watermark-remove Image Watermark Remove 图片去水印(同步兼容;Web 推荐任务接口) 推荐:POST /api/v1/image/tasks/watermark-remove + GET /api/v1/tasks/{id} - regions 优先;其次 mask_url;都为空时 auto_detect(OpenNoMark / OWLv2) ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageWatermarkRemoveRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/adjust Adjust Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdjustRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/collage Collage Images ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CollageRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/compress Compress Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompressRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/convert Convert Format ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConvertRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/crop Crop Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CropRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/defog Defog Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DefogRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/basic/formats Get Supported Formats ```json { "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## POST /api/v1/image/basic/mirror Mirror Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__endpoints__image__basic__MirrorRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/modify-md5 Modify Md5 ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__endpoints__image__basic__ModifyMd5Request" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/mosaic Mosaic Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MosaicRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/resize Resize Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResizeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/rotate Rotate Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RotateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/stretch-recovery Stretch Recovery ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StretchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/triple-cover Triple Cover ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TripleCoverRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/basic/upload Upload Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_image_api_v1_image_basic_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/effects/batch-watermark Batch Watermark ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchWatermarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/effects/doodle-watermark Add Doodle Watermark ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__endpoints__image__effects__DoodleWatermarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/effects/effect Effect Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/effects/effects List Effects ```json { "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## POST /api/v1/image/effects/filter Filter Image ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## GET /api/v1/image/effects/filters List Filters ```json { "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } ``` ## POST /api/v1/image/effects/sticker-watermark Add Sticker Watermark ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__endpoints__image__effects__StickerWatermarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/effects/text-watermark Add Text Watermark ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__endpoints__image__effects__TextWatermarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/image/tasks/watermark-remove Create Image Watermark Remove Task ```json { "security": [ { "HTTPBearer": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageWatermarkRemoveTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsyncTaskCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` # Components ```json { "schemas": { "AICutoutRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" } }, "type": "object", "required": [ "image_url" ], "title": "AICutoutRequest", "description": "AI智能抠图请求" }, "AdjustRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "brightness": { "type": "number", "maximum": 3.0, "minimum": 0.0, "title": "Brightness", "default": 1.0 }, "contrast": { "type": "number", "maximum": 3.0, "minimum": 0.0, "title": "Contrast", "default": 1.0 }, "saturation": { "type": "number", "maximum": 3.0, "minimum": 0.0, "title": "Saturation", "default": 1.0 } }, "type": "object", "required": [ "image_url" ], "title": "AdjustRequest" }, "AsyncTaskCreateResponse": { "properties": { "success": { "type": "boolean", "title": "Success", "default": true }, "task_id": { "type": "integer", "title": "Task Id" }, "status": { "type": "string", "title": "Status", "default": "pending" }, "message": { "type": "string", "title": "Message", "default": "任务已提交,正在处理中" }, "progress_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Progress Token" }, "estimated_time_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Estimated Time Seconds" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "task_id" ], "title": "AsyncTaskCreateResponse" }, "BackgroundRemoveRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "return_mask": { "type": "boolean", "title": "Return Mask", "description": "是否返回mask", "default": false }, "feather_edge": { "type": "integer", "maximum": 20.0, "minimum": 0.0, "title": "Feather Edge", "description": "边缘羽化像素", "default": 0 }, "background_color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Background Color", "description": "替换背景色 如 #FFFFFF" } }, "type": "object", "title": "BackgroundRemoveRequest", "description": "背景移除请求" }, "BackgroundRemoveResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "mask_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mask Url" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "BackgroundRemoveResponse", "description": "背景移除响应" }, "BatchWatermarkRequest": { "properties": { "image_urls": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Image Urls" }, "text": { "type": "string", "minLength": 1, "title": "Text" }, "position_x": { "type": "integer", "title": "Position X", "default": 10 }, "position_y": { "type": "integer", "title": "Position Y", "default": 10 }, "font_size": { "type": "integer", "title": "Font Size", "default": 20 }, "color": { "type": "string", "title": "Color", "default": "white" } }, "type": "object", "required": [ "image_urls", "text" ], "title": "BatchWatermarkRequest" }, "Body_background_remove_upload_api_v1_image_ai_bg_remove_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "default": "png" }, "return_mask": { "type": "boolean", "title": "Return Mask", "default": false }, "feather_edge": { "type": "integer", "title": "Feather Edge", "default": 0 } }, "type": "object", "required": [ "file" ], "title": "Body_background_remove_upload_api_v1_image_ai_bg_remove_upload_post" }, "Body_image_enhance_upload_api_v1_image_ai_enhance_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "enhance_type": { "type": "string", "title": "Enhance Type", "default": "auto" }, "sharpen_strength": { "type": "number", "title": "Sharpen Strength", "default": 0.5 }, "denoise_strength": { "type": "number", "title": "Denoise Strength", "default": 0.3 }, "color_enhance": { "type": "number", "title": "Color Enhance", "default": 0.2 }, "face_enhance": { "type": "boolean", "title": "Face Enhance", "default": true } }, "type": "object", "required": [ "file" ], "title": "Body_image_enhance_upload_api_v1_image_ai_enhance_upload_post" }, "Body_image_extend_upload_api_v1_image_ai_extend_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "direction": { "type": "string", "title": "Direction", "default": "right" }, "extend_ratio": { "type": "number", "title": "Extend Ratio", "default": 0.5 }, "prompt": { "type": "string", "title": "Prompt", "default": "" }, "negative_prompt": { "type": "string", "title": "Negative Prompt", "default": "" } }, "type": "object", "required": [ "file" ], "title": "Body_image_extend_upload_api_v1_image_ai_extend_upload_post" }, "Body_image_recolor_upload_api_v1_image_ai_recolor_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "target_colors": { "type": "string", "title": "Target Colors", "default": "" }, "style": { "type": "string", "title": "Style", "default": "natural" }, "strength": { "type": "number", "title": "Strength", "default": 0.8 }, "preserve_luminance": { "type": "boolean", "title": "Preserve Luminance", "default": true } }, "type": "object", "required": [ "file" ], "title": "Body_image_recolor_upload_api_v1_image_ai_recolor_upload_post" }, "Body_image_upscale_upload_api_v1_image_ai_upscale_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "scale": { "type": "number", "title": "Scale", "default": 4.0 }, "face_enhance": { "type": "boolean", "title": "Face Enhance", "default": false }, "denoise_strength": { "type": "number", "title": "Denoise Strength", "default": 0.5 } }, "type": "object", "required": [ "file" ], "title": "Body_image_upscale_upload_api_v1_image_ai_upscale_upload_post" }, "Body_object_remove_upload_api_v1_image_ai_object_remove_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "mask_data": { "type": "string", "title": "Mask Data", "default": "" }, "processing_mode": { "type": "string", "title": "Processing Mode", "default": "standard" }, "inpaint_mode": { "type": "string", "title": "Inpaint Mode", "default": "auto" } }, "type": "object", "required": [ "file" ], "title": "Body_object_remove_upload_api_v1_image_ai_object_remove_upload_post" }, "Body_upload_image_api_v1_image_basic_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_image_api_v1_image_basic_upload_post" }, "ClarityRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" } }, "type": "object", "required": [ "image_url" ], "title": "ClarityRequest", "description": "清晰度增强请求" }, "CollageRequest": { "properties": { "image_urls": { "items": { "type": "string" }, "type": "array", "minItems": 2, "title": "Image Urls" }, "layout": { "type": "string", "title": "Layout", "default": "horizontal" } }, "type": "object", "required": [ "image_urls" ], "title": "CollageRequest" }, "ColorizeRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" } }, "type": "object", "required": [ "image_url" ], "title": "ColorizeRequest", "description": "黑白上色请求" }, "CompressRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "quality": { "type": "integer", "maximum": 100.0, "minimum": 1.0, "title": "Quality", "default": 80 } }, "type": "object", "required": [ "image_url" ], "title": "CompressRequest" }, "ConvertRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "output_format": { "type": "string", "title": "Output Format", "default": "png" } }, "type": "object", "required": [ "image_url" ], "title": "ConvertRequest" }, "CropRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "x": { "type": "integer", "title": "X", "default": 0 }, "y": { "type": "integer", "title": "Y", "default": 0 }, "width": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Width" }, "height": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Height" }, "output_format": { "type": "string", "title": "Output Format", "default": "png" } }, "type": "object", "required": [ "image_url", "width", "height" ], "title": "CropRequest" }, "DefogRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "intensity": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Intensity", "default": 0.5 } }, "type": "object", "required": [ "image_url" ], "title": "DefogRequest" }, "EffectRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "effect": { "type": "string", "title": "Effect", "default": "sketch" }, "intensity": { "type": "number", "maximum": 3.0, "minimum": 0.0, "title": "Intensity", "default": 1.0 } }, "type": "object", "required": [ "image_url" ], "title": "EffectRequest" }, "EnhanceType": { "type": "string", "enum": [ "auto", "face", "general" ], "title": "EnhanceType", "description": "增强类型" }, "ExtendDirection": { "type": "string", "enum": [ "up", "down", "left", "right", "all" ], "title": "ExtendDirection", "description": "图像扩展方向" }, "FilterRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "filter_type": { "type": "string", "title": "Filter Type", "default": "blur" } }, "type": "object", "required": [ "image_url" ], "title": "FilterRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ImageAIProcessingMode": { "type": "string", "enum": [ "fast", "standard", "quality" ], "title": "ImageAIProcessingMode", "description": "处理模式" }, "ImageAITaskListResponse": { "properties": { "tasks": { "items": { "$ref": "#/components/schemas/ImageAITaskResponse" }, "type": "array", "title": "Tasks" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "tasks", "total", "page", "page_size" ], "title": "ImageAITaskListResponse", "description": "AI图片任务列表响应" }, "ImageAITaskResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "task_type": { "$ref": "#/components/schemas/ImageAITaskType" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode" }, "source_image_url": { "type": "string", "title": "Source Image Url" }, "source_width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Source Width" }, "source_height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Source Height" }, "result_image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Image Url" }, "result_width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Width" }, "result_height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Height" }, "processing_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Processing Params" }, "progress": { "type": "number", "title": "Progress", "default": 0.0 }, "current_step": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Step" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "processing_time_seconds": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Processing Time Seconds" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "task_type", "status", "processing_mode", "source_image_url", "created_at", "updated_at" ], "title": "ImageAITaskResponse", "description": "AI图片任务响应" }, "ImageAITaskStatus": { "type": "string", "enum": [ "pending", "processing", "completed", "failed" ], "title": "ImageAITaskStatus", "description": "任务状态" }, "ImageAITaskType": { "type": "string", "enum": [ "background_remove", "image_extend", "image_recolor", "image_upscale", "object_remove", "image_enhance" ], "title": "ImageAITaskType", "description": "AI图片处理任务类型" }, "ImageAIUploadResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "message": { "type": "string", "title": "Message", "default": "图片已上传,任务处理中" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ImageAIUploadResponse", "description": "图片上传响应" }, "ImageEnhanceRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "enhance_type": { "$ref": "#/components/schemas/EnhanceType", "default": "auto" }, "sharpen_strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Sharpen Strength", "description": "锐化强度", "default": 0.5 }, "denoise_strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Denoise Strength", "description": "降噪强度", "default": 0.3 }, "color_enhance": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Color Enhance", "description": "色彩增强", "default": 0.2 }, "face_enhance": { "type": "boolean", "title": "Face Enhance", "description": "是否增强人脸", "default": true } }, "type": "object", "title": "ImageEnhanceRequest", "description": "图像增强请求" }, "ImageEnhanceResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ImageEnhanceResponse", "description": "图像增强响应" }, "ImageExtendRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "direction": { "$ref": "#/components/schemas/ExtendDirection", "description": "扩展方向", "default": "right" }, "extend_ratio": { "type": "number", "maximum": 2.0, "minimum": 0.1, "title": "Extend Ratio", "description": "扩展比例", "default": 0.5 }, "prompt": { "type": "string", "title": "Prompt", "description": "内容提示词", "default": "" }, "negative_prompt": { "type": "string", "title": "Negative Prompt", "description": "负面提示词", "default": "" } }, "type": "object", "title": "ImageExtendRequest", "description": "图像扩展请求" }, "ImageExtendResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ImageExtendResponse", "description": "图像扩展响应" }, "ImageGenerateRequest": { "properties": { "prompt": { "type": "string", "maxLength": 2000, "minLength": 1, "title": "Prompt" }, "negative_prompt": { "type": "string", "maxLength": 2000, "title": "Negative Prompt", "description": "仅 Infer/Krea 生效", "default": "" }, "width": { "type": "integer", "maximum": 1024.0, "minimum": 256.0, "title": "Width", "description": "宽(调用方指定,≤1K;GeekAI 按 GPT-Image-2.5 约束修正)", "default": 1024 }, "height": { "type": "integer", "maximum": 1024.0, "minimum": 256.0, "title": "Height", "description": "高(调用方指定,≤1K;GeekAI 按 GPT-Image-2.5 约束修正)", "default": 1024 }, "num_inference_steps": { "type": "integer", "maximum": 16.0, "minimum": 1.0, "title": "Num Inference Steps", "description": "仅 Infer/Krea 生效", "default": 8 }, "guidance_scale": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Guidance Scale", "description": "仅 Infer/Krea 生效", "default": 0.0 }, "seed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seed", "description": "仅 Infer/Krea 生效" }, "output_format": { "type": "string", "title": "Output Format", "description": "png/jpg/webp", "default": "png" }, "quality": { "type": "string", "title": "Quality", "description": "仅支持 low(本环境约束)", "default": "low" }, "model": { "anyOf": [ { "type": "string", "enum": [ "gpt-image-2", "gpt-image-2.5-sunburst" ] }, { "type": "null" } ], "title": "Model", "description": "GeekAI 生图模型;省略则用 SH_GEEKAI_IMAGE_MODEL(默认 gpt-image-2)" } }, "type": "object", "required": [ "prompt" ], "title": "ImageGenerateRequest", "description": "文生图请求。\n\n走 GeekAI(quality 固定 low,size 由调用方指定且 ≤1K)。\nGeekAI 模型由调用方指定:gpt-image-2 / gpt-image-2.5-sunburst;省略则用 SH_GEEKAI_IMAGE_MODEL。\n\n文档:\n- https://docs.geekai.co/cn/docs/image/openai/gpt-image-2\n- https://docs.geekai.co/cn/docs/image/openai/gpt-image-2.5\n不支持 negative_prompt/seed/aspect_ratio(GeekAI 路径会忽略)。\nsize 由 width/height 指定,≤1K;网关按 GPT-Image-2.5 约束修正\n(16 倍数、像素 655360–8294400、宽高比 1:3–3:1)。" }, "ImageOcrRequest": { "properties": { "image_url": { "type": "string", "title": "Image Url", "description": "图片 URL" }, "task": { "type": "string", "enum": [ "text", "table", "formula", "document" ], "title": "Task", "default": "text" }, "model": { "type": "string", "enum": [ "glm-ocr", "pp-ocrv5" ], "title": "Model", "description": "自主选型:glm-ocr | pp-ocrv5", "default": "glm-ocr" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt" }, "return_layout": { "type": "boolean", "title": "Return Layout", "default": true } }, "type": "object", "required": [ "image_url" ], "title": "ImageOcrRequest" }, "ImageRecolorRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "target_colors": { "items": { "type": "string" }, "type": "array", "title": "Target Colors", "description": "目标颜色列表 如 ['#FF0000', '#00FF00']", "default": [] }, "style": { "$ref": "#/components/schemas/RecolorStyle", "default": "natural" }, "strength": { "type": "number", "maximum": 1.0, "minimum": 0.1, "title": "Strength", "description": "重着色强度", "default": 0.8 }, "preserve_luminance": { "type": "boolean", "title": "Preserve Luminance", "description": "保持原图亮度", "default": true } }, "type": "object", "title": "ImageRecolorRequest", "description": "图像重着色请求" }, "ImageRecolorResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ImageRecolorResponse", "description": "图像重着色响应" }, "ImageRegionModel": { "properties": { "x": { "type": "integer", "minimum": 0.0, "title": "X" }, "y": { "type": "integer", "minimum": 0.0, "title": "Y" }, "width": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Width" }, "height": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Height" } }, "type": "object", "required": [ "x", "y", "width", "height" ], "title": "ImageRegionModel", "description": "图片水印区域(像素坐标)" }, "ImageUpscaleRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "scale": { "type": "integer", "maximum": 8.0, "minimum": 2.0, "title": "Scale", "description": "放大倍数 2/4/8", "default": 4 }, "face_enhance": { "type": "boolean", "title": "Face Enhance", "description": "是否增强人脸", "default": false }, "denoise_strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Denoise Strength", "description": "降噪强度", "default": 0.5 } }, "type": "object", "title": "ImageUpscaleRequest", "description": "图像放大请求" }, "ImageUpscaleResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "result_width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Width" }, "result_height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Height" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ImageUpscaleResponse", "description": "图像放大响应" }, "ImageWatermarkRemoveRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "regions": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ImageRegionModel" }, "type": "array" }, { "type": "null" } ], "title": "Regions", "description": "手动指定的水印矩形,优先于 mask_url / auto_detect" }, "mask_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mask Url", "description": "自定义掩码图 URL(白=待修复)" }, "auto_detect": { "type": "boolean", "title": "Auto Detect", "description": "regions/mask_url 均为空时自动检测文字水印", "default": true }, "dilate_px": { "type": "integer", "maximum": 64.0, "minimum": 0.0, "title": "Dilate Px", "description": "掩码膨胀像素", "default": 6 }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/jpeg/webp", "default": "png" } }, "type": "object", "required": [ "image_url" ], "title": "ImageWatermarkRemoveRequest", "description": "图片去水印请求(Media / LaMa)\n\n掩码优先级:regions > mask_url > auto_detect(OpenNoMark / OWLv2)。" }, "ImageWatermarkRemoveTaskRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "regions": { "anyOf": [ { "items": { "additionalProperties": { "type": "integer" }, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Regions" }, "mask_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mask Url" }, "auto_detect": { "type": "boolean", "title": "Auto Detect", "default": true }, "dilate_px": { "type": "integer", "maximum": 64.0, "minimum": 0.0, "title": "Dilate Px", "default": 6 }, "output_format": { "type": "string", "title": "Output Format", "default": "png" } }, "type": "object", "required": [ "image_url" ], "title": "ImageWatermarkRemoveTaskRequest" }, "InpaintMode": { "type": "string", "enum": [ "auto", "fast", "quality" ], "title": "InpaintMode", "description": "修复模式" }, "LosslessZoomRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "scale": { "type": "number", "maximum": 8.0, "minimum": 1.0, "title": "Scale", "default": 2.0 } }, "type": "object", "required": [ "image_url" ], "title": "LosslessZoomRequest", "description": "无损放大请求" }, "MosaicRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "block_size": { "type": "integer", "maximum": 128.0, "minimum": 2.0, "title": "Block Size", "default": 16 }, "x": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "X" }, "y": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Y" }, "width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Width" }, "height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Height" } }, "type": "object", "required": [ "image_url" ], "title": "MosaicRequest" }, "ObjectRemoveRequest": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url", "description": "图片URL" }, "processing_mode": { "$ref": "#/components/schemas/ImageAIProcessingMode", "default": "standard" }, "output_format": { "type": "string", "title": "Output Format", "description": "输出格式 png/jpg/webp", "default": "png" }, "mask_data": { "type": "string", "title": "Mask Data", "description": "mask数据 base64编码" }, "inpaint_mode": { "$ref": "#/components/schemas/InpaintMode", "default": "auto" } }, "type": "object", "required": [ "mask_data" ], "title": "ObjectRemoveRequest", "description": "对象移除请求" }, "ObjectRemoveResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "status": { "$ref": "#/components/schemas/ImageAITaskStatus" }, "result_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Url" }, "message": { "type": "string", "title": "Message", "default": "任务已提交" } }, "type": "object", "required": [ "task_id", "status" ], "title": "ObjectRemoveResponse", "description": "对象移除响应" }, "PortraitAnimationRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" } }, "type": "object", "required": [ "image_url" ], "title": "PortraitAnimationRequest", "description": "人像动画化请求" }, "RecolorStyle": { "type": "string", "enum": [ "natural", "artistic", "vintage", "vibrant" ], "title": "RecolorStyle", "description": "重着色风格" }, "ResizeRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Width" }, "height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Height" }, "scale": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Scale" }, "maintain_aspect": { "type": "boolean", "title": "Maintain Aspect", "default": true } }, "type": "object", "required": [ "image_url" ], "title": "ResizeRequest" }, "RotateRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "angle": { "type": "number", "title": "Angle", "default": 90 }, "expand": { "type": "boolean", "title": "Expand", "default": true } }, "type": "object", "required": [ "image_url" ], "title": "RotateRequest" }, "StretchRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "target_ratio": { "type": "string", "title": "Target Ratio", "default": "16:9" }, "mode": { "type": "string", "title": "Mode", "default": "crop" }, "fill_color": { "type": "string", "title": "Fill Color", "default": "#000000" } }, "type": "object", "required": [ "image_url" ], "title": "StretchRequest" }, "StyleTransferRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "style": { "type": "string", "title": "Style", "default": "oil_painting" } }, "type": "object", "required": [ "image_url" ], "title": "StyleTransferRequest" }, "TripleCoverRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "style": { "type": "string", "title": "Style", "default": "horizontal" } }, "type": "object", "required": [ "image_url" ], "title": "TripleCoverRequest" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "src__api__v1__endpoints__image__basic__MirrorRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "direction": { "type": "string", "title": "Direction", "default": "horizontal" } }, "type": "object", "required": [ "image_url" ], "title": "MirrorRequest" }, "src__api__v1__endpoints__image__basic__ModifyMd5Request": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "target_md5": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Md5" } }, "type": "object", "required": [ "image_url" ], "title": "ModifyMd5Request" }, "src__api__v1__endpoints__image__effects__DoodleWatermarkRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "doodle_data": { "type": "string", "title": "Doodle Data" }, "position_x": { "type": "integer", "minimum": 0.0, "title": "Position X", "default": 0 }, "position_y": { "type": "integer", "minimum": 0.0, "title": "Position Y", "default": 0 }, "opacity": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Opacity", "default": 1.0 } }, "type": "object", "required": [ "image_url", "doodle_data" ], "title": "DoodleWatermarkRequest" }, "src__api__v1__endpoints__image__effects__StickerWatermarkRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "sticker_url": { "type": "string", "title": "Sticker Url" }, "position_x": { "type": "integer", "minimum": 0.0, "title": "Position X", "default": 10 }, "position_y": { "type": "integer", "minimum": 0.0, "title": "Position Y", "default": 10 }, "width": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Width" }, "height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Height" } }, "type": "object", "required": [ "image_url", "sticker_url" ], "title": "StickerWatermarkRequest" }, "src__api__v1__endpoints__image__effects__TextWatermarkRequest": { "properties": { "image_url": { "type": "string", "minLength": 1, "title": "Image Url" }, "text": { "type": "string", "minLength": 1, "title": "Text" }, "position_x": { "type": "integer", "minimum": 0.0, "title": "Position X", "default": 10 }, "position_y": { "type": "integer", "minimum": 0.0, "title": "Position Y", "default": 10 }, "font_size": { "type": "integer", "maximum": 200.0, "minimum": 8.0, "title": "Font Size", "default": 20 }, "color": { "type": "string", "title": "Color", "default": "white" } }, "type": "object", "required": [ "image_url", "text" ], "title": "TextWatermarkRequest" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } ```