通义千问生成图像
curl --request POST \
--url https://zero.cat/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": {
"messages": [
{
"role": "<string>",
"content": [
{
"text": "<string>"
}
]
}
]
},
"parameters": {
"negative_prompt": "<string>",
"prompt_extend": true,
"watermark": true,
"size": "<string>"
}
}
'import requests
url = "https://zero.cat/v1/images/generations"
payload = {
"model": "<string>",
"input": { "messages": [
{
"role": "<string>",
"content": [{ "text": "<string>" }]
}
] },
"parameters": {
"negative_prompt": "<string>",
"prompt_extend": True,
"watermark": True,
"size": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: {messages: [{role: '<string>', content: [{text: '<string>'}]}]},
parameters: {
negative_prompt: '<string>',
prompt_extend: true,
watermark: true,
size: '<string>'
}
})
};
fetch('https://zero.cat/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}图像
通义千问生成图像
百炼qwen-image系列图片生成
POST
/
v1
/
images
/
generations
通义千问生成图像
curl --request POST \
--url https://zero.cat/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": {
"messages": [
{
"role": "<string>",
"content": [
{
"text": "<string>"
}
]
}
]
},
"parameters": {
"negative_prompt": "<string>",
"prompt_extend": true,
"watermark": true,
"size": "<string>"
}
}
'import requests
url = "https://zero.cat/v1/images/generations"
payload = {
"model": "<string>",
"input": { "messages": [
{
"role": "<string>",
"content": [{ "text": "<string>" }]
}
] },
"parameters": {
"negative_prompt": "<string>",
"prompt_extend": True,
"watermark": True,
"size": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: {messages: [{role: '<string>', content: [{text: '<string>'}]}]},
parameters: {
negative_prompt: '<string>',
prompt_extend: true,
watermark: true,
size: '<string>'
}
})
};
fetch('https://zero.cat/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}
