gpt-image-1 API
OpenAI’sgpt-image-1 image generation API offers both text-to-image generation and image-to-image editing with text guidance capabilities.Before using this API, please ensure you have the latest OpenAI package installed by running
pip install -U openai.
Important Notes
Model and Pricing
Note: The input text tokens are billed separately at $5 per million tokens.
API Usage
Endpoints- Image generation:
https://aihubmix.com/v1/images/generations - Image editing:
https://aihubmix.com/v1/images/edits
Output Examples
Rejection Scenarios
Error message when a request is rejected:moderation_blocked error will be thrown in multi-image generation.
Therefore, it’s recommended to proactively avoid potential intellectual property (IP) or copyright issues to minimize the risk of system rejection and ensure smooth generation.
✍️ Key recommendations:
- Avoid direct use of copyrighted characters, logos, celebrity likenesses, etc.
- Consider using “style inspiration”, “creative reinterpretation”, or “generalized descriptions” instead
- If referencing specific elements, check whether they fall within the public domain