反词 - 追加反词(MX绘画-生成类接口-Cute-生成示例(必看))
curl --request POST \
--url https://api.maxapi.ai/api/v1/images/cute/generate \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"args": {
"prompt": "a girl",
"upscaler": 1,
"ratio": 1,
"extra_model": [],
"negative_type": 2,
"negative_prompt": "坏手,坏脚"
},
"callback_url": "http://127.0.0.1:1234",
"type": "MX-CUTE"
}
'import requests
url = "https://api.maxapi.ai/api/v1/images/cute/generate"
payload = {
"args": {
"prompt": "a girl",
"upscaler": 1,
"ratio": 1,
"extra_model": [],
"negative_type": 2,
"negative_prompt": "坏手,坏脚"
},
"callback_url": "http://127.0.0.1:1234",
"type": "MX-CUTE"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
args: {
prompt: 'a girl',
upscaler: 1,
ratio: 1,
extra_model: [],
negative_type: 2,
negative_prompt: '坏手,坏脚'
},
callback_url: 'http://127.0.0.1:1234',
type: 'MX-CUTE'
})
};
fetch('https://api.maxapi.ai/api/v1/images/cute/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/api/v1/images/cute/generate"
payload := strings.NewReader("{\n \"args\": {\n \"prompt\": \"a girl\",\n \"upscaler\": 1,\n \"ratio\": 1,\n \"extra_model\": [],\n \"negative_type\": 2,\n \"negative_prompt\": \"坏手,坏脚\"\n },\n \"callback_url\": \"http://127.0.0.1:1234\",\n \"type\": \"MX-CUTE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/api/v1/images/cute/generate")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"args\": {\n \"prompt\": \"a girl\",\n \"upscaler\": 1,\n \"ratio\": 1,\n \"extra_model\": [],\n \"negative_type\": 2,\n \"negative_prompt\": \"坏手,坏脚\"\n },\n \"callback_url\": \"http://127.0.0.1:1234\",\n \"type\": \"MX-CUTE\"\n}")
.asString();{
"code": 0,
"msg": "成功",
"data": {
"img_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}POST
https://api.maxapi.ai
/
api
/
v1
/
images
/
cute
/
generate
反词 - 追加反词(MX绘画-生成类接口-Cute-生成示例(必看))
curl --request POST \
--url https://api.maxapi.ai/api/v1/images/cute/generate \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"args": {
"prompt": "a girl",
"upscaler": 1,
"ratio": 1,
"extra_model": [],
"negative_type": 2,
"negative_prompt": "坏手,坏脚"
},
"callback_url": "http://127.0.0.1:1234",
"type": "MX-CUTE"
}
'import requests
url = "https://api.maxapi.ai/api/v1/images/cute/generate"
payload = {
"args": {
"prompt": "a girl",
"upscaler": 1,
"ratio": 1,
"extra_model": [],
"negative_type": 2,
"negative_prompt": "坏手,坏脚"
},
"callback_url": "http://127.0.0.1:1234",
"type": "MX-CUTE"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
args: {
prompt: 'a girl',
upscaler: 1,
ratio: 1,
extra_model: [],
negative_type: 2,
negative_prompt: '坏手,坏脚'
},
callback_url: 'http://127.0.0.1:1234',
type: 'MX-CUTE'
})
};
fetch('https://api.maxapi.ai/api/v1/images/cute/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/api/v1/images/cute/generate"
payload := strings.NewReader("{\n \"args\": {\n \"prompt\": \"a girl\",\n \"upscaler\": 1,\n \"ratio\": 1,\n \"extra_model\": [],\n \"negative_type\": 2,\n \"negative_prompt\": \"坏手,坏脚\"\n },\n \"callback_url\": \"http://127.0.0.1:1234\",\n \"type\": \"MX-CUTE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/api/v1/images/cute/generate")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"args\": {\n \"prompt\": \"a girl\",\n \"upscaler\": 1,\n \"ratio\": 1,\n \"extra_model\": [],\n \"negative_type\": 2,\n \"negative_prompt\": \"坏手,坏脚\"\n },\n \"callback_url\": \"http://127.0.0.1:1234\",\n \"type\": \"MX-CUTE\"\n}")
.asString();{
"code": 0,
"msg": "成功",
"data": {
"img_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}请求体
application/json