Application Process
To use the OpenAI Chat Completion 4o Image API, you can first visit the OpenAI Chat Completion 4o Image API page and click the “Acquire” button to obtain the credentials needed for the request:
If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page.
There is a free quota available for first-time applicants, allowing you to use the API for free.
GPT-4o Drawing Model
Generate Images Based on Reference Images
Below is an example of generating a custom style image based on a reference image. First, let’s look at the input image, as shown below:
The reference image is a real person’s picture, and we can change its style, for example, transforming it into an anime-style image. The specific request example is as follows:
choices inside the message is the complete dialogue result, and the image result is also included in the dialogue result. It can be seen that the generated image is indeed in anime style, as shown in the following image:

Pure Text Image Generation
We can generate an image through a prompt and return it to us in a conversational format. Below, we takeCreate an image of a sunset in a futuristic city as an example, with the specific example as follows:

Generate One Image from Multiple Images
We can also use multiple reference images to generate one image. For example, using an image of a handsome man and a coffee image, we can generate an image of a handsome man drinking coffee. Below are the specific reference images:

generate a boy holding a coffee and about to drink it as an example, here are the specific examples:

Error Handling
When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:400 token_mismatched: Bad request, possibly due to missing or invalid parameters.400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.

