https://github.com/alphasnow/liblib
LiblibAI-哩布哩布AI的API接口
https://github.com/alphasnow/liblib
Last synced: over 1 year ago
JSON representation
LiblibAI-哩布哩布AI的API接口
- Host: GitHub
- URL: https://github.com/alphasnow/liblib
- Owner: alphasnow
- License: mit
- Created: 2024-12-20T02:28:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T03:28:49.000Z (over 1 year ago)
- Last Synced: 2025-01-04T18:17:08.594Z (over 1 year ago)
- Language: Go
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# liblib
LiblibAI-哩布哩布AI的API接口 https://www.liblib.art/
## 功能
- Text2Img
- Img2Img
- Text2ImgUltra
- Img2ImgUltra
- Text2ImgClassic
- Img2ImgClassic
- Status
## 示例
### 建立任务
```go
api := liblib.NewAPI("AccessKey", "SecretKey")
req := []byte(`{
"templateUuid": "6f7c4652458d4802969f8d089cf5b91f",
"generateParams": {
"prompt": "filmfotos, Asian portrait,A young woman wearing a green baseball cap,covering one eye with her hand",
"steps": 20,
"width": 768,
"height": 1024,
"imgCount": 1,
"seed": -1,
"restoreFaces": 0,
"additionalNetwork": [
{
"modelId": "169505112cee468b95d5e4a5db0e5669",
"weight": 1.0
}
]
}
}`)
resp, err := api.Generate(liblib.Text2Img, req)
fmt.Println(resp, err)
// resp.Data.GenerateUuid
```
### 查询任务结果
```go
api := liblib.NewAPI("AccessKey", "SecretKey")
req := &schema.StatusReq{GenerateUuid: "GenerateUuid"}
resp, err := api.Status(req)
// resp.Data.GenerateStatus
```