Text-to-image (Image Generation-V1)
Request
Example:Bearer {{YOUR_API_KEY}}
Body Params application/json
text_prompts
array [object {2}]
required{
"text_prompts": [
{
"text": "A lighthouse on a cliff",
"weight": 0.5
}
]
}
Request samples
curl --location --request POST 'https://api.302.ai/sd/v1/generation/stable-diffusion-xl-1024-v1-0/text-to-image' \
--header 'Accept: image/png' \
--header 'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header 'Content-Type: application/json' \
--data-raw '{
"text_prompts": [
{
"text": "A lighthouse on a cliff",
"weight": 0.5
}
]
}'
Responses
application/json Modified at 2024-08-27 09:13:08