You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for image generation using gpt-image-1 (sashabaranov#971)
* feat: add gpt-image-1 support
* feat: add example to generate image using gpt-image-1 model
* style: missing period in comments
* feat: add missing fields to example
* docs: add GPT Image 1 to README
* revert: keep `examples/images/main.go` unchanged
* docs: remove unnecessary newline from example in README file
Prompt: "Parrot on a skateboard performing a trick. Large bold text \"SKATE MASTER\" banner at the bottom of the image. Cartoon style, natural light, high detail, 1:1 aspect ratio.",
381
+
Background: openai.CreateImageBackgroundOpaque,
382
+
Model: openai.CreateImageModelGptImage1,
383
+
Size: openai.CreateImageSize1024x1024,
384
+
N: 1,
385
+
Quality: openai.CreateImageQualityLow,
386
+
OutputCompression: 100,
387
+
OutputFormat: openai.CreateImageOutputFormatJPEG,
388
+
// Moderation: openai.CreateImageModerationLow,
389
+
// User: "",
390
+
}
391
+
392
+
resp, err:= c.CreateImage(ctx, req)
393
+
if err != nil {
394
+
fmt.Printf("Image creation Image generation with GPT Image 1error: %v\n", err)
0 commit comments