Openai Gpt Image 1
Playground
Try it on WavespeedAI!OpenAI’s gpt-image-1 enables image generation and image editing via OpenAI’s image API, ideal for creating and refining images. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
OpenAI GPT-Image-1
Edit and transform images with natural language using OpenAI’s GPT-Image-1. This versatile model understands your instructions to apply style changes, modifications, and creative transformations — with optional mask support for precise regional editing and multiple quality tiers to match your needs and budget.
Why It Looks Great
- Natural language editing: Describe transformations in plain text — style changes, modifications, enhancements.
- Mask support: Use mask images for precise control over which areas to edit.
- Quality tiers: Choose from low, medium, or high quality based on your needs.
- Multiple sizes: Output in square (1024x1024) or rectangular (1024x1536, 1536x1024) formats.
- Style transformation: Excel at converting images to different artistic styles.
- OpenAI quality: Powered by advanced vision-language understanding.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text instruction describing the edit or transformation you want. |
| image | Yes | Source image to edit (upload or public URL). |
| quality | No | Output quality: low, medium, or high. Default: medium. |
| mask_image | No | Optional mask to specify edit regions (upload or URL). |
| size | No | Output dimensions: 1024x1024, 1024x1536, or 1536x1024. |
| enable_sync_mode | No | API only: Waits for result and returns it directly. |
| enable_base64_output | No | API only: Returns base64 string instead of URL. |
How to Use
- Write your edit instruction — describe the transformation you want (e.g., “Become a comic style”).
- Upload your image — drag and drop or paste a public URL.
- Choose quality — select low, medium, or high based on your needs.
- Add mask (optional) — upload a mask image to limit edits to specific areas.
- Select size — choose your desired output dimensions.
- Run — click the button to apply the edit.
- Download — preview and save your transformed image.
Pricing
Pricing varies by quality level and output size.
Square Output (1024x1024)
| Quality | Cost |
|---|---|
| Low | $0.011 |
| Medium | $0.042 |
| High | $0.167 |
Rectangular Output (1024x1536 or 1536x1024)
| Quality | Cost |
|---|---|
| Low | $0.016 |
| Medium | $0.063 |
| High | $0.250 |
Quick Reference
| Quality | 1024x1024 | 1024x1536 / 1536x1024 |
|---|---|---|
| Low | $0.011 | $0.016 |
| Medium | $0.042 | $0.063 |
| High | $0.167 | $0.250 |
Best Use Cases
- Style Transfer — Convert photos to comic, cartoon, painting, or other artistic styles.
- Creative Transformation — Reimagine images with different aesthetics or themes.
- Regional Editing — Use masks to edit specific areas while preserving the rest.
- Content Enhancement — Improve or modify specific aspects of images.
- Artistic Interpretation — Transform photos into various art forms.
Example Prompts
- “Become a comic style”
- “Transform into a watercolor painting”
- “Make it look like a vintage photograph from the 1950s”
- “Convert to anime style illustration”
- “Apply a cyberpunk neon aesthetic”
- “Turn into a pencil sketch”
Quality Guide
| Quality | Best For | Trade-off |
|---|---|---|
| Low | Quick previews, testing concepts, high-volume processing | Fastest, most affordable, lower detail |
| Medium | General use, social media, balanced needs | Good quality/cost balance |
| High | Professional work, final deliverables, maximum detail | Highest quality, premium price |
Pro Tips for Best Results
- Start with medium quality to test your prompt, then upgrade to high for final output.
- Use masks when you want to preserve specific areas untouched.
- Be specific about the target style — “comic style”, “oil painting”, “anime”.
- For style transfers, simpler source images often produce cleaner results.
- Rectangular sizes work well for portraits (1024x1536) or landscapes (1536x1024).
- The model interprets style instructions creatively — embrace the artistic interpretation.
Notes
- If using URLs for images or masks, ensure they are publicly accessible.
- The enable_sync_mode and enable_base64_output options are only available through the API.
- Mask images should be black and white, where white indicates areas to edit.
- Processing time varies by quality level — higher quality takes longer.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/openai/gpt-image-1" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"quality": "medium",
"size": "auto",
"enable_sync_mode": false,
"enable_base64_output": false
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for the generation. | |
| image | string | Yes | - | The image to edit. | |
| quality | string | No | medium | high, medium, low | The quality of the generated image. |
| mask_image | string | No | - | An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file | |
| size | string | No | auto | auto, 1024*1024, 1024*1536, 1536*1024 | The size of the generated media in pixels (width*height). |
| enable_sync_mode | boolean | No | false | - | If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API. |
| enable_base64_output | boolean | No | false | - | If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |