Midjourney
Редактирование изображения
Изменяет исходное изображение по текстовому описанию. Размер каждого
файла не должен превышать 12 МБ. Несколько изображений можно передать
в повторяющемся поле image[].
Запрос выполняется синхронно.
POST
/
v1
/
images
/
edits
Редактирование изображения
curl --request POST \
--url https://api.nixai.ru/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=midjourney-fast \
--form 'prompt=make the sky stormy, add lightning' \
--form 'image=@example-file;type=image/*'import requests
url = "https://api.nixai.ru/v1/images/edits"
files = { "image": ("example-file", open("example-file", "rb"), "image/*") }
payload = {
"model": "midjourney-fast",
"prompt": "make the sky stormy, add lightning"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'midjourney-fast');
form.append('prompt', 'make the sky stormy, add lightning');
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.nixai.ru/v1/images/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import fs from 'fs';
const formData = new FormData();
formData.append('model', 'midjourney-fast');
formData.append('prompt', 'make the sky stormy, add lightning');
formData.append('image', new Blob([fs.readFileSync('example-file')], { type: 'image/*' }), 'example-file');
const url = 'https://api.nixai.ru/v1/images/edits';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}, body: formData};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nixai.ru/v1/images/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nixai.ru/v1/images/edits"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.nixai.ru/v1/images/edits")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixai.ru/v1/images/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.nixai.ru/v1/images/edits' -Method POST -Headers $headers -ContentType 'multipart/form-data' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="model"
midjourney-fast
-----011000010111000001101001
Content-Disposition: form-data; name="prompt"
make the sky stormy, add lightning
-----011000010111000001101001
Content-Disposition: form-data; name="image"; filename="example-file"
Content-Type: image/*
<string>
-----011000010111000001101001--'import Foundation
let parameters = [
[
"name": "model",
"value": "midjourney-fast"
],
[
"name": "prompt",
"value": "make the sky stormy, add lightning"
],
[
"name": "image",
"value": "<string>",
"fileName": "example-file",
"contentType": "image/*"
]
]
let boundary = "---011000010111000001101001"
var body = ""
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["contentType"]!
let fileContent = try String(contentsOfFile: filename, encoding: .utf8)
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let postData = Data(body.utf8)
let url = URL(string: "https://api.nixai.ru/v1/images/edits")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.nixai.ru/v1/images/edits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("model", "midjourney-fast");
request.AddParameter("prompt", "make the sky stormy, add lightning");
request.AddFile("image", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.nixai.ru/v1/images/edits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("model", "midjourney-fast");
request.AddParameter("prompt", "make the sky stormy, add lightning");
request.AddFile("image", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const form = new FormData();
form.append('model', 'midjourney-fast');
form.append('prompt', 'make the sky stormy, add lightning');
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.nixai.ru/v1/images/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.nixai.ru/v1/images/edits");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.nixai.ru/v1/images/edits");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
val request = Request.Builder()
.url("https://api.nixai.ru/v1/images/edits")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute()falsefalse{
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}curl https://api.nixai.ru/v1/images/edits \
-H "Authorization: Bearer $NIXAI_API_KEY" \
--max-time 360 \
-F model="midjourney-fast" \
-F prompt="make the sky stormy, add lightning" \
-F image="@photo.png"
Authorizations
Заголовок авторизации вида Bearer <token>, где <token> — ваш API-ключ.
Body
multipart/form-data
Модель определяет скорость генерации и цену запроса:
midjourney-fast— быстрая генерация, $0.07 за запрос;midjourney-turbo— максимальная скорость, $0.11 за запрос.
Available options:
midjourney-fast, midjourney-turbo Example:
"midjourney-fast"
Что изменить в исходном изображении.
Example:
"make the sky stormy, add lightning"
Исходное изображение размером не больше 12 МБ. Чтобы передать
несколько файлов, используйте повторяющееся поле image[].
Response
Изображения отредактированы
Список готовых изображений. Их количество определяет Midjourney, а не параметр запроса.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Редактирование изображения
curl --request POST \
--url https://api.nixai.ru/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=midjourney-fast \
--form 'prompt=make the sky stormy, add lightning' \
--form 'image=@example-file;type=image/*'import requests
url = "https://api.nixai.ru/v1/images/edits"
files = { "image": ("example-file", open("example-file", "rb"), "image/*") }
payload = {
"model": "midjourney-fast",
"prompt": "make the sky stormy, add lightning"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'midjourney-fast');
form.append('prompt', 'make the sky stormy, add lightning');
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.nixai.ru/v1/images/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import fs from 'fs';
const formData = new FormData();
formData.append('model', 'midjourney-fast');
formData.append('prompt', 'make the sky stormy, add lightning');
formData.append('image', new Blob([fs.readFileSync('example-file')], { type: 'image/*' }), 'example-file');
const url = 'https://api.nixai.ru/v1/images/edits';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}, body: formData};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nixai.ru/v1/images/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nixai.ru/v1/images/edits"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.nixai.ru/v1/images/edits")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixai.ru/v1/images/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.nixai.ru/v1/images/edits' -Method POST -Headers $headers -ContentType 'multipart/form-data' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="model"
midjourney-fast
-----011000010111000001101001
Content-Disposition: form-data; name="prompt"
make the sky stormy, add lightning
-----011000010111000001101001
Content-Disposition: form-data; name="image"; filename="example-file"
Content-Type: image/*
<string>
-----011000010111000001101001--'import Foundation
let parameters = [
[
"name": "model",
"value": "midjourney-fast"
],
[
"name": "prompt",
"value": "make the sky stormy, add lightning"
],
[
"name": "image",
"value": "<string>",
"fileName": "example-file",
"contentType": "image/*"
]
]
let boundary = "---011000010111000001101001"
var body = ""
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["contentType"]!
let fileContent = try String(contentsOfFile: filename, encoding: .utf8)
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let postData = Data(body.utf8)
let url = URL(string: "https://api.nixai.ru/v1/images/edits")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.nixai.ru/v1/images/edits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("model", "midjourney-fast");
request.AddParameter("prompt", "make the sky stormy, add lightning");
request.AddFile("image", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.nixai.ru/v1/images/edits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("model", "midjourney-fast");
request.AddParameter("prompt", "make the sky stormy, add lightning");
request.AddFile("image", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const form = new FormData();
form.append('model', 'midjourney-fast');
form.append('prompt', 'make the sky stormy, add lightning');
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.nixai.ru/v1/images/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.nixai.ru/v1/images/edits");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.nixai.ru/v1/images/edits");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nmidjourney-fast\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nmake the sky stormy, add lightning\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: image/*\r\n\r\n<string>\r\n-----011000010111000001101001--")
val request = Request.Builder()
.url("https://api.nixai.ru/v1/images/edits")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute()falsefalse{
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}{
"type": "error",
"error": {
"type": "api_error",
"message": "No upstream provider is currently available.",
"code": "no_channels_available",
"param": null
},
"request_id": "req_01ABCDEF"
}