https://smew.ai.
This reference is intentionally split into two layers:
- current documented capability:
gpt-image-2 - planned capability: async mode
gpt-image-2 model directly from the API playground in this section.
How to use this page
This page works best as a single overview you can copy, especially when you want to:- give an AI assistant enough context to generate integration code for a third-party system
- hand engineers a compact explanation of the current image workflow
- debug with
POSTfirst, then move the same request shape into your backend
Before you call the API
- Create an API key at https://smew.ai/keys.
- In the playground, click Authorize and paste your key as a Bearer token.
- Use
POST /v1/images/generationsto get a synchronous response directly.
What the current synchronous mode includes
The current synchronous mode mainly contains twoPOST endpoints:
1. POST /v1/images/generations
Use it for:
- text-to-image
- prompt-based image generation
- real-time image generation inside websites, bots, or workflow systems
- returns results synchronously
- easy to debug first in Playground, curl, or Postman
- easy to convert into Python, Node.js, Java, Go, or third-party integration code with AI
2. POST /v1/images/edits
Use it for:
- image editing
- image-to-image workflows
- masked edits
- background replacement
- also uses
POST - supports JSON requests with
image_url - supports multipart form-data file upload
Copyable integration brief for AI or engineers
If you want to integrate these APIs into another system, you can copy the text below directly into an AI assistant:Current minimal debugging workflow
Start by testingPOST /v1/images/generations with this payload:
Why the POST workflow also fits production integration
For third-party integration, the POST workflow is useful because:
- you can verify the request first in Playground, curl, or Postman
- then move the same request structure into your backend implementation
POST flow works for both debugging and real integration.
What to expect right now
POST /v1/images/generationsreturns the image result directly in synchronous mode.POST /v1/images/editssupports both JSONimage_urlpayloads and multipart file uploads.
Planned async section
Async mode will be documented separately later so the currentgpt-image-2 request model and the future async workflow stay clearly separated.
Chinese quickstart
Read the Chinese guide for curl and Python examples