zf-kbot/md-me-lama
Public
39.3K
runs
Run zf-kbot/md-me-lama with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| apikey |
string
|
访问密钥。必须与服务端环境变量 "
"ME_LAMA_APIKEY 一致;缺失、为空或不匹配都会被拒绝,"
"且服务端不区分这三种情况。
|
|
| image |
string
|
640x640 不透明 PNG 工作图(RGB 或 RGBA,8 位)的标准 base64,"
"或 data:image/png;base64,...;解码后最多 2 MiB。"
"裁切、补边与缩放必须由调用方先做完,服务端不会再改尺寸。
|
|
| mask |
string
|
640x640 二值 PNG 掩码的标准 base64 或 data:image/png;base64,...,"
"与 image 同尺寸,解码后最多 2 MiB。"
"0=保留,255=擦除。全 0 原样返回;非二值或全 255 被拒绝。
|
{
"type": "object",
"title": "Input",
"required": [
"apikey",
"image",
"mask"
],
"properties": {
"mask": {
"type": "string",
"title": "Mask",
"x-order": 2,
"description": "640x640 \u4e8c\u503c PNG \u63a9\u7801\u7684\u6807\u51c6 base64 \u6216 data:image/png;base64,...\uff0c\"\n \"\u4e0e image \u540c\u5c3a\u5bf8\uff0c\u89e3\u7801\u540e\u6700\u591a 2 MiB\u3002\"\n \"0=\u4fdd\u7559\uff0c255=\u64e6\u9664\u3002\u5168 0 \u539f\u6837\u8fd4\u56de\uff1b\u975e\u4e8c\u503c\u6216\u5168 255 \u88ab\u62d2\u7edd\u3002"
},
"image": {
"type": "string",
"title": "Image",
"x-order": 1,
"description": "640x640 \u4e0d\u900f\u660e PNG \u5de5\u4f5c\u56fe\uff08RGB \u6216 RGBA\uff0c8 \u4f4d\uff09\u7684\u6807\u51c6 base64\uff0c\"\n \"\u6216 data:image/png;base64,...\uff1b\u89e3\u7801\u540e\u6700\u591a 2 MiB\u3002\"\n \"\u88c1\u5207\u3001\u8865\u8fb9\u4e0e\u7f29\u653e\u5fc5\u987b\u7531\u8c03\u7528\u65b9\u5148\u505a\u5b8c\uff0c\u670d\u52a1\u7aef\u4e0d\u4f1a\u518d\u6539\u5c3a\u5bf8\u3002"
},
"apikey": {
"type": "string",
"title": "Apikey",
"format": "password",
"x-order": 0,
"writeOnly": true,
"description": "\u8bbf\u95ee\u5bc6\u94a5\u3002\u5fc5\u987b\u4e0e\u670d\u52a1\u7aef\u73af\u5883\u53d8\u91cf \"\n \"ME_LAMA_APIKEY \u4e00\u81f4\uff1b\u7f3a\u5931\u3001\u4e3a\u7a7a\u6216\u4e0d\u5339\u914d\u90fd\u4f1a\u88ab\u62d2\u7edd\uff0c\"\n \"\u4e14\u670d\u52a1\u7aef\u4e0d\u533a\u5206\u8fd9\u4e09\u79cd\u60c5\u51b5\u3002",
"x-cog-secret": true
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output"
}