GPT
GPT 图像

phatchau036/gpt-image-2

Model ID: phatchau036/gpt-image-2
系列
GPT
上下文
未填写
每次请求
0.012 人民币
请求数
2.7K
成功率
95.0%
Tokens
1.88M
可用率 97.32%
24 小时前现在
7 天前现在

定价

每次请求
0.012 人民币
支持的 Endpoint
https://api.xah.io/v1/images/generations
https://api.xah.io/v1/images/edits
方法 POST · application/json
认证 Bearer token (API key)
API 类型 图像

技术说明

This model supports both image generation and editing.

分享

curl 'https://api.xah.io/v1/images/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Tạo ảnh con chó",
    "size": "1024x1024",
    "quality": "low"
}'
// Node.js / Browser
const res = await fetch('https://api.xah.io/v1/images/generations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "model": "gpt-image-2",
    "prompt": "Tạo ảnh con chó",
    "size": "1024x1024",
    "quality": "low"
})
});
const data = await res.json();
console.log(data);
import requests

url = 'https://api.xah.io/v1/images/generations'
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
}
payload = {
    "model": "gpt-image-2",
    "prompt": "Tạo ảnh con chó",
    "size": "1024x1024",
    "quality": "low"
}

res = requests.post(url, headers=headers, json=payload, timeout=120)
print(res.status_code, res.json())
{
    "model": "gpt-image-2",
    "prompt": "Tạo ảnh con chó",
    "size": "1024x1024",
    "quality": "low"
}
评分与评论
5.0 / 1 条评价
正在加载评价...
联系支持
我们随时为您提供帮助