Hình ảnhOpenAIMới

GPT Image 2

Mô hình tạo ảnh mới nhất của OpenAI

model: "gpt-image-2"

Tài liệu APITài liệu dành cho agents

Các chế độ

Một ID mô hình, mọi chế độ bên dưới. Các trường bạn gửi chọn chế độ, và giá theo chế độ.

Chế độĐược chọn bằngGiá điển hình
Từ văn bản sang hình ảnhprompt
Yêu cầu ví dụ
{
  "model": "gpt-image-2",
  "input": {
    "prompt": "a lighthouse at dusk"
  }
}
$0.041
Chỉnh sửa hình ảnhimage_url
Yêu cầu ví dụ
{
  "model": "gpt-image-2",
  "input": {
    "prompt": "a lighthouse at dusk",
    "image_url": "https://example.com/image.jpg"
  }
}
$0.197

Đầu vào

Bắt buộc

Prompt

Tùy chọn

Image Size

Tùy chọn
1

Number of Images

Tùy chọn

Source image to edit or vary (https URL, or an upload URL from POST /v1/uploads). Leave it out to generate from the prompt alone.

Tùy chọn

More source images (https URLs), for edits that combine several images. image_url, if sent, is the first.

Tùy chọn nâng cao (2)

Cài đặt nhà cung cấp ngoài các điều khiển chính. Để trống để sử dụng các giá trị mặc định của mô hình.

Tùy chọn
-

Compression level of the output file.

Tùy chọn

File format of the result.

Kết quả

GPT Image 2Kết quả mẫu

Kết quả thực từ mô hình này. Chạy để xem kết quả của bạn ở đây.

curl https://arteza.ai/api/v1/generations \
  -H "Authorization: Bearer $ARTEZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "input": {
    "prompt": "Extreme macro of fresh wasabi being hand-grated on a sharkskin oroshigane, pale green paste accumulating in delicate curls at the leading edge, raking cool north-light revealing every cellulose fiber and fine moisture bead on the rhizome surface, square abstract food and craft composition, muted jade and pale ivory palette, fine grated mist suspended above the grater teeth, entirely unpeopled, precise botanical clarity"
  }
}'
GPT Image 2 1GPT Image 2 2GPT Image 2 3GPT Image 2 4GPT Image 2 5GPT Image 2 6