Lora(图片生成-Lora)
POST
/302/submit/lora302.AI的API,来自于我们在云GPU上自己部署的模型。部分模型为开源模型,部分模型为我们自己微调或开发的。
用于图片生成,可自定义模型和lora
平均运行时长5-10s
价格:0.05 PTC/次
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model_name
string
必需
prompt
string
必需
negative_prompt
string
可选
prompt_weighting
boolean
可选
loras
array [object {3}]
可选
path
string
可选
scale
number
可选
force
boolean
可选
embeddings
array [object {1}]
可选
path
string
可选
controlnets
array[string]
可选
ip_adapter
array[string]
可选
image_size
string
可选
image_format
string
可选
示例
{
"model_name": "stabilityai/stable-diffusion-xl-base-1.0",
"prompt": "Photo of a european medieval 40 year old queen, silver hair, highly detailed face, detailed eyes, head shot, intricate crown, age spots, wrinkles",
"negative_prompt": "cartoon, painting, illustration, worst quality, low quality, normal quality",
"prompt_weighting": true,
"loras": [
{
"path": "https://xxx",
"scale": 0.9,
"force": true
}
],
"embeddings": [
{
"path": "https://xxx"
}
],
"controlnets": [],
"ip_adapter": [],
"image_encoder_weight_name": "pytorch_model.bin",
"image_size": "square_hd",
"guidance_scale": 7.5,
"image_format": "jpeg",
}
示例代码
返回响应
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
completed_at
string
必需
created_at
string
必需
error
string
必需
id
string
必需
model
string
必需
output
string
必需
started_at
string
必需
status
string
必需
示例
{
"completed_at": "",
"created_at": "",
"error": "",
"id": "",
"model": "",
"output": "",
"started_at": "",
"status": ""
}
最后修改时间: 2 个月前