0G Foundation 제공
Asynchronous text-to-image model with Base64 output. Generates at most 2 images per request — requesting more (n > 2) returns 2 images, not an error.
2K
토큰 2,048개
—
$0.04
이미지당
—
이미지에 해당 없음
비동기 API — 이미지 생성은 비동기 흐름을 사용합니다: 작업을 제출한 후 결과를 폴링합니다. 아래 예제는 두 단계를 모두 보여줍니다.
# 1. Submit async job
curl "https://router-api.0g.ai/v1/async/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "z-image-turbo",
"prompt": "A futuristic city skyline at sunset",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'
# Response: {"jobId": "abc123", "status": "pending", "provider_address": "0x..."}
# 2. Poll for result (repeat until status is "completed")
curl "https://router-api.0g.ai/v1/async/jobs/<JOB_ID>?provider_address=<PROVIDER_ADDRESS>&model=z-image-turbo" \
-H "Authorization: Bearer <YOUR_API_KEY>"TEE 인증
verify_tee로 온체인 서명 인증을 요청하세요. 응답에는 trace에 tee_verified 필드가 포함됩니다.
{
"model": "z-image-turbo",
"prompt": "A futuristic city skyline at sunset",
"verify_tee": true
}
# Then poll with verify_tee query param
curl "https://router-api.0g.ai/v1/async/jobs/<JOB_ID>?provider_address=<ADDR>&model=z-image-turbo&verify_tee=true" \
-H "Authorization: Bearer <YOUR_API_KEY>"제공자 라우팅
X-0G-Provider-* 요청 헤더를 사용하여 요청을 처리할 제공자를 제어합니다.
curl "https://router-api.0g.ai/v1/async/images/generations" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "z-image-turbo",
"prompt": "A futuristic city skyline at sunset"
}'비공개 모델 전용
이 모델은 비공개입니다. 요청을 TEE 지원 제공자로 고정하려면 X-0G-Provider-Trust-Mode: private 헤더를 추가하세요. 옵트인 방식이며 기본적으로 적용되지 않습니다.
X-0G-Provider-Trust-Mode: private