zf-kbot/md-me-lama
Public
34
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 一致;缺失、为空或不匹配都会被拒绝,"
"且服务端不区分这三种情况。
|
|
| input_image |
string
|
640x640 不透明 PNG 工作图(RGB 或 RGBA,8 位)。"
"裁切、补边与缩放必须由调用方先做完,服务端不会再改尺寸。
|
|
| mask |
string
|
640x640 二值 PNG 掩码,与 input_image 同尺寸。"
"0=保留,255=擦除。非二值、全 0、全 255 都会被拒绝。
|
{
"type": "object",
"title": "Input",
"required": [
"apikey",
"input_image",
"mask"
],
"properties": {
"mask": {
"type": "string",
"title": "Mask",
"format": "uri",
"x-order": 2,
"description": "640x640 \u4e8c\u503c PNG \u63a9\u7801\uff0c\u4e0e input_image \u540c\u5c3a\u5bf8\u3002\"\n \"0=\u4fdd\u7559\uff0c255=\u64e6\u9664\u3002\u975e\u4e8c\u503c\u3001\u5168 0\u3001\u5168 255 \u90fd\u4f1a\u88ab\u62d2\u7edd\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
},
"input_image": {
"type": "string",
"title": "Input Image",
"format": "uri",
"x-order": 1,
"description": "640x640 \u4e0d\u900f\u660e PNG \u5de5\u4f5c\u56fe\uff08RGB \u6216 RGBA\uff0c8 \u4f4d\uff09\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"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output",
"format": "uri"
}