您可以在图像视频生成 API 页面查看平台支持的图像视频模型,也可以调用查找模型 API 查找平台支持的模型。

下文提供了一些使用查找模型 API 查找 Stable Diffusion 模型的示例。

查询 Checkpoint 模型

Checkpoint 模型是 Stable Diffusion 的主模型,包含了大量的场景素材。其他模型都是在 Checkpoint 模型的基础上进行细节定制。

以下示例演示如何使用 RESTful API 查询 Checkpoint 模型。

请求:

curl --location --request GET 'https://api.ppinfra.com/v3/model?filter.visibility=public&pagination.limit=10&pagination.cursor=c_0&filter.types=checkpoint&filter.source=civitai' \
--header 'Authorization: Bearer <Your API Key>' | jq '.models[].sd_name'

响应

"realisticVisionV40_v40VAE-inpainting_81543.safetensors"
"meinahentai_v4_70340.safetensors"
"epicrealism_naturalSinRC1VAE_106430.safetensors"
"lawlassYiffymix20Furry_lawlasmixWithBakedIn_13264.safetensors"
"epicrealism_pureEvolutionV5_97793.safetensors"
"realisticAfmix_realisticAfmix_75178.safetensors"
"majicmixRealistic_v6_65516.safetensors"
"revAnimated_v122.safetensors"
"epicphotogasm_x_131265.safetensors"
"majicmixRealistic_v7_134792.safetensors"

查询 LoRA 模型

LoRA 模型是一个微调模型,主要用于对人物进行定制。

以下示例演示如何使用 RESTful API 查询 LoRA 模型。

请求

curl --location --request GET 'https://api.ppinfra.com/v3/model?filter.visibility=public&pagination.limit=10&pagination.cursor=c_0&filter.types=lora&filter.source=civitai' \
--header 'Authorization: Bearer <Your API Key>' | jq '.models[].sd_name'

响应

"weight_slider_v2_91681"
"gender_slider_v1_87782"
"hair_length_slider_v1_88944"
"MyBreastHelperReducedRS_77310"
"loona-lora-v3-latest_8919"
"faceage_60965"
"ahegaov1A_36846"
"add_detail_44319"
"excessive_pubic_hair_125352"
"smug-07_50930"

查询 VAE 模型

VAE 模型是一个美化模型,主要用于美化图片的色彩。

以下示例演示如何使用 RESTful API 查询 VAE 模型。

请求

curl --location --request GET 'https://api.ppinfra.com/v3/model?filter.visibility=public&pagination.limit=10&pagination.cursor=c_0&filter.types=vae&filter.source=civitai' \
--header 'Authorization: Bearer <Your API Key>' | jq '.models[].sd_name'

响应

"anythingKlF8Anime2VaeFtMse840000_blessed2_137707.safetensors"
"color101VAE_v1_57292.pt"
"klF8Anime2VAE_klF8Anime2VAE_207314.safetensors"
"clearvae_v23_141093.safetensors"

查询 Textual Inversion 模型

以下示例演示如何使用 RESTful API 查询 Textual Inversion 模型。

请求

curl --location --request GET 'https://api.ppinfra.com/v3/model?filter.visibility=public&pagination.limit=10&pagination.cursor=c_0&filter.types=textualinversion&filter.source=civitai' \
--header 'Authorization: Bearer <Your API Key>' | jq '.models[].sd_name'

响应

"MidAged"
"Adult"
"AS-Adult-neg"
"AS-Adult"
"AS-Elderly"
"AS-MidAged"
"AS-YoungerV2"
"AS-YoungestV2"
"AS-YoungV2-neg"
"AS-YoungV2"