模型:

stablediffusionapi/anything-v45

英文

anything-v4.5 API 推理

获取 API 密钥

从 Stable Diffusion API 获取 API 密钥,无需付款。

将密钥替换到下面的代码中,并将 model_id 更改为 "anything-v45"

在 PHP/Node/Java 等编程语言中进行编码?查看文档获取更多代码示例: View docs

免费试用该模型: Generate Images

模型链接: View model

致谢: View credits

查看所有模型: View Models

import requests  
import json  
  
url =  "https://stablediffusionapi.com/api/v3/dreambooth"  
  
payload = json.dumps({  
"key":  "your_api_key",  
"model_id":  "anything-v45",  
"prompt":  "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K",  
"negative_prompt":  "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime",  
"width":  "512",  
"height":  "512",  
"samples":  "1",  
"num_inference_steps":  "30",  
"safety_checker":  "no",  
"enhance_prompt":  "yes",  
"seed":  None,  
"guidance_scale":  7.5,  
"multi_lingual":  "no",  
"panorama":  "no",  
"self_attention":  "no",  
"upscale":  "no",  
"embeddings":  "embeddings_model_id",  
"lora":  "lora_model_id",  
"webhook":  None,  
"track_id":  None  
})  
  
headers =  {  
'Content-Type':  'application/json'  
}  
  
response = requests.request("POST", url, headers=headers, data=payload)  
  
print(response.text)

使用此优惠码可享受25%折扣 DMGG0RBN