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 payload = """ { "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.apimart.ai/v1/images/generations")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); System.out.println(HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()).body()); }}
<?php$payload = ["model" => "wan2.7-image-pro", "prompt" => "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"];$ch = curl_init("https://api.apimart.ai/v1/images/generations");curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_HTTPHEADER => ["Authorization: Bearer <token>", "Content-Type: application/json"]]);echo curl_exec($ch); curl_close($ch);?>
require 'net/http'require 'json'require 'uri'url = URI("https://api.apimart.ai/v1/images/generations")payload = { model: "wan2.7-image-pro", prompt: "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"}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://api.apimart.ai/v1/images/generations")!let payload: [String: Any] = [ "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"]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 str = String(data: data, encoding: .utf8) { print(str) }}task.resume()
using System.Net.Http; using System.Text;var payload = @"{""model"":""wan2.7-image-pro"",""prompt"":""정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된""}";using var client = new HttpClient();client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");var res = await client.PostAsync("https://api.apimart.ai/v1/images/generations", new StringContent(payload, Encoding.UTF8, "application/json"));Console.WriteLine(await res.Content.ReadAsStringAsync());
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 payload = """ { "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.apimart.ai/v1/images/generations")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); System.out.println(HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()).body()); }}
<?php$payload = ["model" => "wan2.7-image-pro", "prompt" => "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"];$ch = curl_init("https://api.apimart.ai/v1/images/generations");curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_HTTPHEADER => ["Authorization: Bearer <token>", "Content-Type: application/json"]]);echo curl_exec($ch); curl_close($ch);?>
require 'net/http'require 'json'require 'uri'url = URI("https://api.apimart.ai/v1/images/generations")payload = { model: "wan2.7-image-pro", prompt: "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"}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://api.apimart.ai/v1/images/generations")!let payload: [String: Any] = [ "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"]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 str = String(data: data, encoding: .utf8) { print(str) }}task.resume()
using System.Net.Http; using System.Text;var payload = @"{""model"":""wan2.7-image-pro"",""prompt"":""정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된""}";using var client = new HttpClient();client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");var res = await client.PostAsync("https://api.apimart.ai/v1/images/generations", new StringContent(payload, Encoding.UTF8, "application/json"));Console.WriteLine(await res.Content.ReadAsStringAsync());
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 payload = """ { "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.apimart.ai/v1/images/generations")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(payload)) .build(); System.out.println(HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()).body()); }}
<?php$payload = ["model" => "wan2.7-image-pro", "prompt" => "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"];$ch = curl_init("https://api.apimart.ai/v1/images/generations");curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_HTTPHEADER => ["Authorization: Bearer <token>", "Content-Type: application/json"]]);echo curl_exec($ch); curl_close($ch);?>
require 'net/http'require 'json'require 'uri'url = URI("https://api.apimart.ai/v1/images/generations")payload = { model: "wan2.7-image-pro", prompt: "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"}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://api.apimart.ai/v1/images/generations")!let payload: [String: Any] = [ "model": "wan2.7-image-pro", "prompt": "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"]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 str = String(data: data, encoding: .utf8) { print(str) }}task.resume()
using System.Net.Http; using System.Text;var payload = @"{""model"":""wan2.7-image-pro"",""prompt"":""정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된""}";using var client = new HttpClient();client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");var res = await client.PostAsync("https://api.apimart.ai/v1/images/generations", new StringContent(payload, Encoding.UTF8, "application/json"));Console.WriteLine(await res.Content.ReadAsStringAsync());
{ "error": { "code": 401, "message": "인증에 실패했습니다. API 키를 확인해 주세요", "type": "authentication_error" }}
{ "error": { "code": 402, "message": "잔액이 부족합니다. 충전 후 다시 시도해 주세요", "type": "payment_required" }}
{ "error": { "code": 429, "message": "요청이 너무 많습니다. 잠시 후 다시 시도해 주세요", "type": "rate_limit_error" }}
{ "error": { "code": 500, "message": "서버 내부 오류가 발생했습니다", "type": "server_error" }}
인증
string
필수
모든 요청에는 Bearer Token 인증이 필요합니다.API Key 관리 페이지에서 API Key를 발급받아 요청 헤더에 추가하세요:
Authorization: Bearer YOUR_API_KEY
사용 가능한 모델
모델명
설명
텍스트 생성 최대 해상도
편집 / 연속 생성 최대 해상도
단가
wan2.7-image-pro
프로 에디션, 디테일 우수, 4K 지원
4K
2K
¥0.50 / 장
wan2.7-image
스탠다드 에디션, 고속 생성
2K
2K
¥0.20 / 장
과금은 성공적으로 생성된 이미지 수 × 단가로 계산됩니다. 입력은 과금되지 않습니다. 해상도와 비율은 가격에 영향을 주지 않습니다. 실패한 요청은 과금되지 않습니다.
Body
string
필수
이미지 생성 모델 이름
wan2.7-image-pro — 프로 에디션, 텍스트 생성 최대 4K
wan2.7-image — 스탠다드 에디션, 고속, 최대 2K
boolean
기본값:"false"
이미지 작업을 제출하기 전에 콘텐츠 검토를 실행할지 여부를 지정합니다.
true: omni-moderation-latest로 프롬프트와 입력 이미지를 검토
false 또는 생략: 검토 요청을 보내지 않으며 검토 비용이나 지연이 추가되지 않음(기본값)
string
이미지 생성을 위한 텍스트 설명. 최대 5000자.
텍스트 생성 모드 (image_urls 없음): 필수
이미지 편집 모드 (image_urls 있음): 선택 사항 (권장)
예: "정교한 창문이 있는 꽃집, 아름다운 나무 문, 꽃이 진열된"
array<string>
입력 이미지 URL 배열. 이미지 편집 및 다중 이미지 참조 시나리오에 사용됩니다.제공하면 이미지 편집 모드로 자동 전환됩니다.지원 형식: HTTP / HTTPS 이미지 링크; data:image/...;base64,... Base64 형식제약: 최대 9장; JPEG / PNG / WEBP / BMP; 240–8000 px; 비율 1:8 ~ 8:1; 장당 ≤ 20MB
출력 비율은 마지막 입력 이미지를 기준으로 자동 조정됩니다. 편집 모드는 최대 2K입니다(4K 미지원).
integer
기본값:"1"
생성할 이미지 수
일반 모드: 1–4(기본값 1)
연속 생성 모드(enable_sequential: true): 1–12(기본값 1)
성공적으로 생성된 이미지 수에 따라 과금됩니다. n 기준으로 사전 차감됩니다.
string
출력 해상도 또는 비율. 세 가지 형식을 지원합니다:① 해상도 키워드 (권장):1K / 2K (기본값) / 4K (wan2.7-image-pro 텍스트 생성 전용)② 비율:1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 (기본적으로 2K 티어로 환산)③ 픽셀 값:1024x1024 또는 1024*1024
string
해상도 키워드: 1K / 2K / 4K. size (비율)와 함께 사용할 수 있습니다.
모델
시나리오
지원 키워드
픽셀 범위
wan2.7-image-pro
텍스트 생성 (비연속)
1K / 2K / 4K
768×768 ~ 4096×4096
wan2.7-image-pro
편집 / 연속 생성
1K / 2K
768×768 ~ 2048×2048
wan2.7-image
모든 시나리오
1K / 2K
768×768 ~ 2048×2048
string
네거티브 프롬프트. 예: "흐릿한, 왜곡된, 저화질"
boolean
기본값:"false"
우측 하단에 “AI 생성” 워터마크를 추가할지 여부
integer
랜덤 시드(0–2147483647). 동일한 파라미터와 동일한 시드를 사용하면 시각적으로 일관된 결과를 생성할 수 있습니다.
boolean
기본값:"true"
강화된 추론 모드. 이미지 품질이 향상되지만 생성 시간이 길어집니다.
연속 생성 모드 비활성화 및 이미지 입력 없음 조건을 모두 만족할 때만 유효합니다.
boolean
기본값:"false"
연속 이미지 생성 모드를 활성화합니다. 스토리보드, 만화, 시리즈에 적합합니다.
활성화 시 n 최대값은 12
연속 생성 모드에서는 thinking_mode와 color_palette 무효
wan2.7-image-pro 연속 생성은 최대 2K(4K 미지원)
array
인터랙티브 편집을 위한 바운딩 박스. 편집하거나 콘텐츠를 삽입할 정확한 영역을 지정합니다.구조:[[[x1, y1, x2, y2], ...], ...]
외부 배열 길이는 image_urls 길이와 같아야 합니다
바운딩 박스가 없는 이미지에는 []를 전달합니다
이미지당 최대 2개 박스. 좌표는 원본 이미지의 절대 픽셀값이며, 좌상단이 (0,0)입니다
{ "model": "wan2.7-image-pro", "prompt": "영화 같은 시리즈: 같은 길고양이 오렌지 고양이. 첫 번째: 봄 벚꽃 나무 아래. 두 번째: 여름 오래된 거리 그늘. 세 번째: 가을 낙엽 가득한 길. 네 번째: 겨울 눈 위의 발자국.", "enable_sequential": true, "n": 4, "size": "2K"}
단일 이미지 편집
{ "model": "wan2.7-image", "prompt": "배경을 노을 장면으로 바꾸고, 전체적으로 따뜻한 색조로", "image_urls": ["https://example.com/portrait.jpg"], "size": "2K" }