Skip to main content
OpenAI ChatGPT is a powerful AI conversational system that can generate smooth and natural replies within seconds based on input prompts. ChatGPT stands out in the industry for its excellent language understanding and generation capabilities. Today, ChatGPT is widely applied across various industries and fields, with its influence becoming increasingly significant. Whether for daily conversations, creative writing, professional consulting, or code programming, ChatGPT provides impressive intelligent assistance, greatly enhancing human work efficiency and creativity. This document mainly introduces the usage process of the OpenAI Chat Completion 4o Image API, which allows us to easily utilize the official OpenAI ChatGPT’s multimodal conversational features.

Application Process

To use OpenAI Chat Completion 4o Image API, first open the Ace Data Cloud Console and copy your API Token. If you are not logged in, you will be redirected to sign in and brought back to this page automatically. A single API Token works across every service on the platform — no need to subscribe per service. New accounts receive free starter credit; when it runs low you can top up your shared balance in the console.
📘 Full documentation: OpenAI Chat Completion 4o Image API →

GPT-4o Drawing Model

Generating Images Based on Reference Images

Below is an example of generating a custom style image based on a given picture. First, let’s look at the input image: The reference image is a photo of a real person. We can transform its style, for example, turning it into an anime-style image. The specific request example is:
Sample result:
The message.content inside choices contains the complete generated conversation result, with the image embedded in Markdown format (the image link is a temporary address, please download and save it promptly). The generated image is indeed in anime style, as shown below:

Text-Only Image Generation

We can generate an image based on a prompt and receive the result in a conversational format. Below is an example with the prompt Create an image of a futuristic city at sunset:
Sample result:
The result matches the prompt, as shown below:

Multiple Images to One Image

We can also use multiple reference images to generate a single image. For example, using a photo of a handsome man and a coffee image, we can generate an image of the man drinking coffee. Below are the reference images:

Here is an example prompt: Generate an image of a man holding coffee and about to drink it:
Sample result:
The generated result indeed combines the two images, as shown below:

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.

Error Response Example

Conclusion

Through this document, you have learned how to easily implement the official OpenAI ChatGPT multimodal image processing features using the OpenAI Chat Completion 4o Image API. We hope this document helps you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.