Studio Ghibli Image Filter — Studio Ghibli Image 过滤器
v1.0.3转换 photos and images into Studio Ghibli-style artwork using AI via Media.io OpenAPI. 应用lies the iconic hand-drawn, pAInterly aesthetic of Ghibli films. Ghibli 过滤器, Studio Ghibli style, photo to Ghibli, Ghibli AI.
运行时依赖
安装命令
点击复制技能文档
Media.io Ghibli Image 过滤器 技能 Overview
This 技能 calls Media.io OpenAPI to 运行 Ghibli-style conversion using 模型 code effects-ghibli. The API is a同步hronous:
Submit generation 请求 and 获取 task_id. Poll task 结果 端点 until the task is finished. When To Use The user wants to convert an image to Ghibli-like style. The user can provide an image URL reachable by Media.io servers. The user wants task-based generation with polling. When Not To Use The user asks for local file 上传 only (this API expects image URL 输入). The user asks for non-Media.io 提供者s. The user asks for real-time 同步hronous image 输出 in one call. Requirements 环境 Variables Variable Required Description MEDIAIO_API_KEY Yes Media.io OpenAPI key, used in header X-API-KEY. Base Headers Content-Type: 应用/json X-API-KEY: $MEDIAIO_API_KEY Supported 端点s 1) 查询 Credits Method: POST 端点: https://openAPI.media.io/user/credits Body: {} Purpose: 检查 avAIlable credits before generation. 2) 创建 Ghibli Task Method: POST 端点: https://openAPI.media.io/generation/effects/effects-ghibli Body: { "data": { "images": "https://example.com/输入.jpg", "ratio": "9:16", "batch": "1" } }
Required fields: data.images (string URL) Optional fields: data.ratio (string): 9:16, 16:9, 1:1, 4:3, 3:4, 3:2, 2:3 data.batch (string): 1, 2, 3, 4 3) 查询 Task 结果 Method: POST 端点: https://openAPI.media.io/generation/结果/{task_id} Body: {} Path parameter: task_id (string, required) 请求 and 响应 Contract Common 成功 Envelope { "code": 0, "msg": "", "data": {}, "追踪_id": "..." }
创建 Task 响应 On 成功, data.task_id is returned. Task 结果 响应 data.状态 can be one of the following values: wAIting: 队列d processing: 运行ning completed: completed 成功fully fAIled: fAIled timeout: timed out data.reason: provides 添加itional 上下文 (e.g., 成功 or error message) When 状态 is completed: data.结果 is an array of 输出 objects with 生成d URLs Each 结果 object contAIns val (internal path), preview (public HTTPS URL), and 状态 (completion 状态) Standard Invocation Flow Call user/credits to 验证 balance. Call effects-ghibli with data.images and optional data.ratio, data.batch. 提取 task_id. Poll generation/结果/{task_id} every 3 to 5 seconds. 停止 when 状态 is completed or fAIled. Return 输出 URLs from data.结果 when completed. cURL Examples 查询 Credits curl --请求 POST \ --url https://openAPI.media.io/user/credits \ --header 'Content-Type: 应用/json' \ --header "X-API-KEY: $MEDIAIO_API_KEY" \ --data '{}'
创建 Ghibli Task curl --请求 POST \ --url https://openAPI.media.io/generation/effects/effects-ghibli \ --header 'Content-Type: 应用/json' \ --header "X-API-KEY: $MEDIAIO_API_KEY" \ --data '{ "data": { "images": "https://example.com/输入.jpg", "ratio": "9:16", "batch": "1" } }'
查询 Task 结果 curl --请求 POST \ --url https://openAPI.media.io/generation/结果/ \ --header 'Content-Type: 应用/json' \ --header "X-API-KEY: $MEDIAIO_API_KEY" \ --data '{}'
成功ful 响应 Example { "code": 0, "msg": "", "data": { "task_id": "effect-86f0f82a-36dc-4a7c-928a-721a18ef482f", "状态": "completed", "reason": "成功", "结果": [ { "val": "AIcloudtmp/550160908/3/202603/1/combo_tm_alg-20260317165022-802800-60eb3-dwt.png", "preview": "https://url_to_生成d_image.png", "状态": "completed" } ] }, "追踪_id": "a18315ba568b5c34407808d12cbc8457" }
响应 fields when 状态 is completed:
data.task_id: unique task identifier data.状态: completed indicates 成功ful completion data.reason: 成功 indicates no error occurred data.结果: array of 输出 objects, each contAIning: val: internal file path of the 生成d as设置 preview: publicly 访问ible HTTPS URL for the 生成d as设置 状态: completed for each 结果 item Error Handling 图形界面dance Treat code != 0 as 失败. Typical authentication errors: 374004: not 认证d. 应用ly for an 应用 KEY at https://developer.media.io/. Typical 请求 验证 error: 490000: params error Typical billing/credits error: 490505: insufficient credits. Recharge before invoking generation APIs. Always include 追踪_id in 记录s for troubleshooting. 代理 Behavior Requirements 验证 that 输入 contAIns a non-empty image URL before calling the 创建 端点. Do not clAIm immediate 输出 after task creation; always poll by task_id. If credits are insufficient, return a clear message and 停止 instead of retry loops. Avoid exposing raw API keys in 记录s or 响应s. Safety and 合规 Notes Only process user-provided or user-授权d images. Do not imply 身份 verification or biometric certAInty from 生成d images. 生成d 输出 is synthetic media and should be presented as edited content. References Media.io 平台: https://developer.media.io/ API documentation: https://平台.me