curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "z-image-turbo",
prompt: "수묵화 스타일의 산수 풍경",
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "잘못된 요청 매개변수",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증 실패, API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "잔액 부족, 충전해 주세요",
"type": "payment_required"
}
}
Z-Image-Turbo
Z-Image-Turbo 이미지 생성
- 비동기 처리 모드, 후속 쿼리를 위한 작업 ID 반환
- 경량 고속 이미지 생성, 중국어와 영어 지원
- 1K/2K 해상도 등급 지원, 스마트 프롬프트 재작성 지원
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "z-image-turbo",
prompt: "수묵화 스타일의 산수 풍경",
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "잘못된 요청 매개변수",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증 실패, API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "잔액 부족, 충전해 주세요",
"type": "payment_required"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "z-image-turbo",
prompt: "수묵화 스타일의 산수 풍경",
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "잘못된 요청 매개변수",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증 실패, API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "잔액 부족, 충전해 주세요",
"type": "payment_required"
}
}
지원되는 모델
| 모델명 | 설명 | 생성 장수 | 과금 방식 |
|---|---|---|---|
z-image-turbo | 경량 고속 이미지 생성, 중국어와 영어 지원 | 고정 1장 | 고정 가격 |
인증
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다API Key 받기:API Key 관리 페이지에서 API Key를 받으세요요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY
Body
string
필수
모델 이름
z-image-turbo- 경량 고속 이미지 생성, 중국어와 영어 지원
boolean
기본값:"false"
이미지 작업을 제출하기 전에 콘텐츠 검토를 실행할지 여부를 지정합니다.
true:omni-moderation-latest로 프롬프트와 입력 이미지를 검토false또는 생략: 검토 요청을 보내지 않으며 검토 비용이나 지연이 추가되지 않음(기본값)
string
필수
이미지 생성을 위한 텍스트 설명, 최대 800자
string
기본값:"1:1"
이미지 가로세로 비율지원되는 가로세로 비율:
1:1- 정사각형 (기본값)4:3- 가로 4:33:4- 세로 3:416:9- 가로 와이드스크린9:16- 세로 전체화면3:2- 가로 3:22:3- 세로 2:3
string
기본값:"1K"
해상도 등급
1K- 표준 해상도 (기본값)2K- 고화질 해상도
boolean
기본값:"false"
스마트 프롬프트 재작성활성화하면 AI가 자동으로 프롬프트를 최적화하여 더 나은 결과를 생성하고, 비용이 증가합니다.
false- 비활성화 (기본값)true- 활성화
해상도 대조표
size(비율) + resolution(해상도 등급) 조합으로 출력 크기를 제어합니다.
| 비율 | 1K 등급 | 2K 등급 |
|---|---|---|
1:1 | 1024×1024 | 2048×2048 |
4:3 | 1152×864 | 2048×1536 |
3:4 | 864×1152 | 1536×2048 |
16:9 | 1280×720 | 2048×1152 |
9:16 | 720×1280 | 1152×2048 |
3:2 | 1248×832 | 2048×1360 |
2:3 | 832×1248 | 1360×2048 |
사용 예시
기본 텍스트-이미지 (최소 요청){
"model": "z-image-turbo",
"prompt": "수묵화 스타일의 산수 풍경"
}
{
"model": "z-image-turbo",
"prompt": "미니멀리즘 스타일의 카페 인테리어 디자인",
"size": "16:9",
"resolution": "2K"
}
{
"model": "z-image-turbo",
"prompt": "고양이",
"prompt_extend": true
}
Response
integer
응답 상태 코드
주의사항
- 비동기 처리: 제출 후
task_id가 반환됩니다. 결과를 얻으려면/v1/tasks/{task_id}를 폴링하세요 - 이미지 저장: 생성된 이미지는 플랫폼 CDN에 미러링되어 장기간 유효합니다
- 과금 규칙: 성공적으로 생성된 이미지 수에 따라 과금, 실패 시 과금되지 않음
- 고정 장수: Z-Image-Turbo는 요청당 고정 1장 생성,
n파라미터는 지원되지 않음