List Generation Models
Action
ListModels
Introduction
This interface is used to query the generation models list.
Request
Parameter Name | Type | Description | Required |
---|---|---|---|
Action | String | The corresponding API instruction name | ✓ |
PublicKey | String | User's public key, which can be obtained from the PICPIK User Center (opens in a new tab) | ✓ |
Signature | String | User's signature generated based on the public key and API instruction, see Signature for details | ✓ |
request_uuid | String | Request UUID, randomly generated by using the UUID generation method. This parameter can be utilized to manage the requests of your business and clients. |
Request Example
{
"Action": "ListModels",
"PublicKey": "ALLak9M4cNdHXKOJAJJ4k8Hh1hZS2EgJF1D0FlPwfl",
"request_uuid":"b91fcfbe-bb35-47ce-a168-bd6252c75270",
"Signature": "0131f4e4296f3ca8e1220b47247e83a4315ea8e1"
}
Response
Field Name | Type | Description | Required |
---|---|---|---|
RetCode | Int | Return status code: 0 indicates a successful return, while non-zero indicates a failure | ✓ |
Action | String | Instruction name | ✓ |
Message | String | The error message is returned when RetCode is non-zero, providing a detailed description | |
request_uuid | String | Returns the UUID that was included in the request |
Field Name | Type | Description | Required |
---|---|---|---|
MainModels | Map[String]Model | Main models | ✓ |
LoraModels | Map[String]Model | Lora models | |
EmbeddingModels | Map[String]Model | Embedding models | |
HypernetworkModels | Map[String]Model | Hypernetwork models |
Intro to Complex Data Types
Model
Field Name | Type | Description | Required |
---|---|---|---|
Name | String | Model name | |
ModelCode | String | Model code | ✓ |
IsOfficial | Bool | Is official model or not | |
TriggerWordList | []String | Trigger word list, only available with LoRA model | |
InferenceParams | InferenceParams | Inference parameters |
InferenceParams
Note: Specific parameters are only valid for a particular model data type (parent) and are not generic.
Parameter Name | Type | Valid Parent Type | Description | Default | Range | Step | Required |
---|---|---|---|---|---|---|---|
LoraWeight | Float | Model | The influence weight when inferencing. Only available with the LoRA model. | 1 | -1~2 | 0.01 | |
Resolution | Int | PreProcessor | The resolution of images generated by the pre-processor. | 512 | 64~2048 | 64 | |
ControlWeight | Float | ControlModel | The influence weight of a ControlNet model when inferencing. | 1 | 0~2 | 0.01 | |
StartingStep | Float | ControlModel | Timing (ratio) of a ControlNet model to start intervening in the inference process. | 0 | 0~1 | 0.01 | |
EndingStep | Float | ControlModel | Timing (ratio) of a ControlNet model to stop intervening in the inference process. | 1 | 0~1 | 0.01 |
Response Example
{
"Action": "ListModels",
"RetCode": 0,
"Message": "",
"request_uuid": "84a53e05-5db6-432a-a15a-184b8c934858",
"MainModels": {
"PICPIK 3D icon": {
"Name": "三维图标",
"ModelCode": "PICPIK 3D icon",
"ModelType": "",
"IsOfficial": true,
"InferenceParams": {
"LoraWeight": 0
}
},
"PICPIK Anime": {
"Name": "动漫",
"ModelCode": "PICPIK Anime",
"ModelType": "",
"IsOfficial": true,
"InferenceParams": {
"LoraWeight": 0
}
},
//more...
},
"LoraModels": {
"SubModel1_20230801_151342": {
"Name": "SubModel1_20230801_151342",
"ModelCode": "SubModel1_20230801_151342",
"ModelType": "",
"IsOfficial": false
},
//more...
}
}