Édition d’images Qwen-Image
curl --request POST \
--url https://api.highwayapi.ai/v3/async/qwen-image-edit \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"seed": 123,
"output_format": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/qwen-image-edit"
payload = {
"prompt": "<string>",
"image": "<string>",
"seed": 123,
"output_format": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({prompt: '<string>', image: '<string>', seed: 123, output_format: '<string>'})
};
fetch('https://api.highwayapi.ai/v3/async/qwen-image-edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/async/qwen-image-edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'image' => '<string>',
'seed' => 123,
'output_format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/async/qwen-image-edit"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/v3/async/qwen-image-edit")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/qwen-image-edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Images
Édition d’images Qwen-Image
POST
/
v3
/
async
/
qwen-image-edit
Édition d’images Qwen-Image
curl --request POST \
--url https://api.highwayapi.ai/v3/async/qwen-image-edit \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"seed": 123,
"output_format": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/qwen-image-edit"
payload = {
"prompt": "<string>",
"image": "<string>",
"seed": 123,
"output_format": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({prompt: '<string>', image: '<string>', seed: 123, output_format: '<string>'})
};
fetch('https://api.highwayapi.ai/v3/async/qwen-image-edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/async/qwen-image-edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'image' => '<string>',
'seed' => 123,
'output_format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/async/qwen-image-edit"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/v3/async/qwen-image-edit")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/qwen-image-edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"seed\": 123,\n \"output_format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Édition d’images Qwen-Image — un modèle MMDiT 20B pour la génération d’édition d’images de nouvelle génération. Basé sur Qwen-Image 20B, il offre une édition de texte bilingue précise (chinois et anglais) tout en conservant le style, et prend en charge l’édition aux niveaux sémantique et d’apparence.
Il s’agit d’une API asynchrone qui renvoie uniquement le task_id de la tâche asynchrone. Vous devez utiliser ce task_id pour appeler l’API de consultation du résultat de tâche afin de récupérer le résultat généré.
En-têtes de requête
string
requis
Valeurs énumérées :
application/jsonstring
requis
Format d’authentification Bearer : Bearer {{API Key}}.
Corps de la requête
string
requis
Invite utilisée pour générer l’image.
string
requis
Image utilisée pour générer l’image.
integer
Graine aléatoire utilisée pour la génération. -1 signifie qu’une graine aléatoire sera utilisée. Plage : -1 ~ 2147483647. La valeur par défaut est -1.
string
Format de l’image de sortie. La valeur par défaut est jpeg.
Valeurs énumérées :
Valeurs énumérées :
jpeg, png, webpParamètres des informations de réponse
string
requis
task_id de la tâche asynchrone. Vous devez utiliser ce task_id pour appeler l’API de consultation du résultat de tâche afin d’obtenir le résultat généré