curl --request POST \ --url https://aireiter.com/api/openapi/submit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" }'
import requestsurl = "https://aireiter.com/api/openapi/submit"payload = { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}response = requests.post(url, json=payload, headers=headers)print(response.json())
const url = "https://aireiter.com/api/openapi/submit";const payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"};const headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"};fetch(url, { method: "POST", headers: headers, body: JSON.stringify(payload)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package mainimport ( "bytes" "encoding/json" "fmt" "io" "net/http")func main() { url := "https://aireiter.com/api/openapi/submit" payload := map[string]interface{}{ "model": "nano_banana_v2_1", "params": map[string]interface{}{ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": []string{"https://example.com/product.png", "https://example.com/style.png"}, "aspect_ratio": "16:9", "resolution": "2K", }, "out_task_id": "my_task_123456", } jsonData, _ := json.Marshal(payload) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Set("Authorization", "Bearer <token>") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}
import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.URI;public class Main { public static void main(String[] args) throws Exception { String url = "https://aireiter.com/api/openapi/submit"; String payload = """ { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" } """; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); }}
<?php$url = "https://aireiter.com/api/openapi/submit";$payload = [ "model" => "nano_banana_v2_1", "params" => [ "prompt" => "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url" => [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio" => "16:9", "resolution" => "2K" ], "out_task_id" => "my_task_123456"];$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer <token>", "Content-Type: application/json"]);$response = curl_exec($ch);curl_close($ch);echo $response;?>
require 'net/http'require 'json'require 'uri'url = URI("https://aireiter.com/api/openapi/submit")payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"}http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Post.new(url)request["Authorization"] = "Bearer <token>"request["Content-Type"] = "application/json"request.body = payload.to_jsonresponse = http.request(request)puts response.body
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "nano_banana_v2_1", "params": [ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" ], "out_task_id": "my_task_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = @"{ ""model"": ""nano_banana_v2_1"", ""params"": { ""prompt"": ""참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도"", ""image_url"": [ ""https://example.com/product.png"", ""https://example.com/style.png"" ], ""aspect_ratio"": ""16:9"", ""resolution"": ""2K"" }, ""out_task_id"": ""my_task_123456"" }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { 'model': 'nano_banana_v2_1', 'params': { 'prompt': '참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도', 'image_url': [ 'https://example.com/product.png', 'https://example.com/style.png' ], 'aspect_ratio': '16:9', 'resolution': '2K' }, 'out_task_id': 'my_task_123456' }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "nano_banana_v2_1", params = list( prompt = "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url = c( "https://example.com/product.png", "https://example.com/style.png" ), aspect_ratio = "16:9", resolution = "2K" ), out_task_id = "my_task_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))
{ "error": { "code": 401, "message": "인증에 실패했습니다. API 키를 확인해 주세요" }}
{ "error": { "code": 433, "message": "계정 잔액이 부족합니다. 충전 후 다시 시도해 주세요" }}
{ "error": { "code": 500, "message": "서버 내부 오류가 발생했습니다. 잠시 후 다시 시도해 주세요" }}
Nano Banana 2.1
Nano Banana 2.1 이미지 생성
비동기 처리 모드, 후속 조회를 위한 작업 ID 반환
텍스트 투 이미지, 이미지 투 이미지, 다중 참조 이미지 융합 편집 지원, 최대 10장의 참조 이미지
이미지 내 텍스트 렌더링 정확도 향상, 1K / 2K / 4K 출력 지원
POST
/
api
/
openapi
/
submit
curl --request POST \ --url https://aireiter.com/api/openapi/submit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" }'
import requestsurl = "https://aireiter.com/api/openapi/submit"payload = { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}response = requests.post(url, json=payload, headers=headers)print(response.json())
const url = "https://aireiter.com/api/openapi/submit";const payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"};const headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"};fetch(url, { method: "POST", headers: headers, body: JSON.stringify(payload)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package mainimport ( "bytes" "encoding/json" "fmt" "io" "net/http")func main() { url := "https://aireiter.com/api/openapi/submit" payload := map[string]interface{}{ "model": "nano_banana_v2_1", "params": map[string]interface{}{ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": []string{"https://example.com/product.png", "https://example.com/style.png"}, "aspect_ratio": "16:9", "resolution": "2K", }, "out_task_id": "my_task_123456", } jsonData, _ := json.Marshal(payload) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Set("Authorization", "Bearer <token>") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}
import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.URI;public class Main { public static void main(String[] args) throws Exception { String url = "https://aireiter.com/api/openapi/submit"; String payload = """ { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" } """; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); }}
<?php$url = "https://aireiter.com/api/openapi/submit";$payload = [ "model" => "nano_banana_v2_1", "params" => [ "prompt" => "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url" => [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio" => "16:9", "resolution" => "2K" ], "out_task_id" => "my_task_123456"];$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer <token>", "Content-Type: application/json"]);$response = curl_exec($ch);curl_close($ch);echo $response;?>
require 'net/http'require 'json'require 'uri'url = URI("https://aireiter.com/api/openapi/submit")payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"}http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Post.new(url)request["Authorization"] = "Bearer <token>"request["Content-Type"] = "application/json"request.body = payload.to_jsonresponse = http.request(request)puts response.body
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "nano_banana_v2_1", "params": [ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" ], "out_task_id": "my_task_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = @"{ ""model"": ""nano_banana_v2_1"", ""params"": { ""prompt"": ""참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도"", ""image_url"": [ ""https://example.com/product.png"", ""https://example.com/style.png"" ], ""aspect_ratio"": ""16:9"", ""resolution"": ""2K"" }, ""out_task_id"": ""my_task_123456"" }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { 'model': 'nano_banana_v2_1', 'params': { 'prompt': '참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도', 'image_url': [ 'https://example.com/product.png', 'https://example.com/style.png' ], 'aspect_ratio': '16:9', 'resolution': '2K' }, 'out_task_id': 'my_task_123456' }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "nano_banana_v2_1", params = list( prompt = "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url = c( "https://example.com/product.png", "https://example.com/style.png" ), aspect_ratio = "16:9", resolution = "2K" ), out_task_id = "my_task_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))
⚠️ 주의: 반드시 data:image/jpeg;base64, 접두사 부분을 포함해야 하며, base64 이미지 크기는 10MB를 초과할 수 없습니다
string
이미지 생성 가로세로 비율지원되는 가로세로 비율:
auto - 자동(프롬프트 또는 참조 이미지에 따라 적절한 비율 선택)
1:1 - 정사각형
3:2 - 가로 3:2
2:3 - 세로 2:3
4:3 - 가로 4:3
3:4 - 세로 3:4
5:4 - 가로 5:4
4:5 - 세로 4:5
16:9 - 가로 와이드스크린
9:16 - 세로 화면
21:9 - 울트라 와이드스크린
string
기본값:"1K"
이미지 해상도지원되는 해상도:
1K - 기본 해상도(기본값)
2K - 표준 해상도
4K - 고해상도
string
필수
요청자 작업 ID사용자 정의 작업 식별자, 필수 항목입니다. 영문자, 숫자, _, -만 지원하며 길이는 1-64자입니다
Response
string
요청자 작업 ID, 결과 조회에 사용 가능
string
초기 상태, "pending"으로 고정
string
생성 시간(ISO 형식)
curl --request POST \ --url https://aireiter.com/api/openapi/submit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" }'
import requestsurl = "https://aireiter.com/api/openapi/submit"payload = { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}response = requests.post(url, json=payload, headers=headers)print(response.json())
const url = "https://aireiter.com/api/openapi/submit";const payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"};const headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"};fetch(url, { method: "POST", headers: headers, body: JSON.stringify(payload)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package mainimport ( "bytes" "encoding/json" "fmt" "io" "net/http")func main() { url := "https://aireiter.com/api/openapi/submit" payload := map[string]interface{}{ "model": "nano_banana_v2_1", "params": map[string]interface{}{ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": []string{"https://example.com/product.png", "https://example.com/style.png"}, "aspect_ratio": "16:9", "resolution": "2K", }, "out_task_id": "my_task_123456", } jsonData, _ := json.Marshal(payload) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Set("Authorization", "Bearer <token>") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}
import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.URI;public class Main { public static void main(String[] args) throws Exception { String url = "https://aireiter.com/api/openapi/submit"; String payload = """ { "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456" } """; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); }}
<?php$url = "https://aireiter.com/api/openapi/submit";$payload = [ "model" => "nano_banana_v2_1", "params" => [ "prompt" => "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url" => [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio" => "16:9", "resolution" => "2K" ], "out_task_id" => "my_task_123456"];$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer <token>", "Content-Type: application/json"]);$response = curl_exec($ch);curl_close($ch);echo $response;?>
require 'net/http'require 'json'require 'uri'url = URI("https://aireiter.com/api/openapi/submit")payload = { model: "nano_banana_v2_1", params: { prompt: "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url: [ "https://example.com/product.png", "https://example.com/style.png" ], aspect_ratio: "16:9", resolution: "2K" }, out_task_id: "my_task_123456"}http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Post.new(url)request["Authorization"] = "Bearer <token>"request["Content-Type"] = "application/json"request.body = payload.to_jsonresponse = http.request(request)puts response.body
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "nano_banana_v2_1", "params": [ "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" ], "out_task_id": "my_task_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = @"{ ""model"": ""nano_banana_v2_1"", ""params"": { ""prompt"": ""참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도"", ""image_url"": [ ""https://example.com/product.png"", ""https://example.com/style.png"" ], ""aspect_ratio"": ""16:9"", ""resolution"": ""2K"" }, ""out_task_id"": ""my_task_123456"" }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{ "model": "nano_banana_v2_1", "params": { "prompt": "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", "image_url": [ "https://example.com/product.png", "https://example.com/style.png" ], "aspect_ratio": "16:9", "resolution": "2K" }, "out_task_id": "my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { 'model': 'nano_banana_v2_1', 'params': { 'prompt': '참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도', 'image_url': [ 'https://example.com/product.png', 'https://example.com/style.png' ], 'aspect_ratio': '16:9', 'resolution': '2K' }, 'out_task_id': 'my_task_123456' }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "nano_banana_v2_1", params = list( prompt = "참고 이미지의 향수병을 비 온 뒤 네온사인 거리에 배치하고, 병 라벨에는 AIReiter라고 적혀 있는 영화 같은 구도", image_url = c( "https://example.com/product.png", "https://example.com/style.png" ), aspect_ratio = "16:9", resolution = "2K" ), out_task_id = "my_task_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))