Skip to main content
OpenAI has recently provided an API for creating model responses. Provide text or image input to generate text or image output. Let the model call your own custom code or use built-in tools, such as web search or file search, to use your own data as input for model responses. This document mainly introduces the usage process of OpenAI Responses API operations. With it, we can easily use the official OpenAI model response creation feature.

GPT-6.1 Sol

Use model: "gpt-6.1-sol" to select this model. It supports streaming output, function calling, structured outputs, and image input. During the first week of availability, it is only available to verified ACE T1+ holders (at least 100,000 ACE) or authorized users; the specific availability time is subject to the console access prompt. Reasoning effort levels support low, medium, high, xhigh, and max, while none and minimal are not currently supported. It is recommended to start with reasoning: {"effort": "low"}. When the input exceeds 272,000 tokens, long-context pricing applies to the entire request, and fees are subject to the current pricing in the console.

Application Process

To use the OpenAI Responses API, first go to the Ace Data Cloud Console to obtain your API Token and keep it as a backup. If you have not yet logged in or registered, you will be automatically redirected to the login page and invited to register and log in. After completion, you will automatically return to the current page. One API Token can invoke all platform services; there is no need to apply separately for each service. Your first application will include free credits for a free trial; when credits are insufficient, you can top up your general balance in the console.
📘 Full documentation: OpenAI Responses API →

Basic Usage

Next, you can fill in the corresponding content in the interface, as shown in the figure:

When using this API for the first time, we need to fill in at least three items. One is authorization, which can be selected directly from the dropdown list. Another parameter is model; model is the official OpenAI ChatGPT model category that we choose to use. Here, we mainly have 20 models, and you can view the details of the models we provide. The last parameter is input; input is the array of prompt words we enter. It is an array, indicating that multiple prompt words can be uploaded at the same time. Each prompt word contains role and content, where role represents the role of the questioner. We provide three identities: user, assistant, and system. The other field, content, is the specific content of our question. At the same time, you can notice that there is corresponding generated calling code on the right. You can copy the code and run it directly, or click the “Try” button directly for testing. Common optional parameters:
  • max_tokens: Limits the maximum number of tokens in a single reply.
  • temperature: Generation randomness, between 0 and 2; the larger the value, the more divergent it is.
  • n: How many candidate replies to generate at once.
  • response_format: Return format setting.
  • tools: Function/tool calling definitions.
  • background: Whether to run asynchronously in the background.

After calling it, we find that the returned result is as follows:
The returned result contains multiple fields, described as follows:
  • id, the ID generated for this conversation task, used to uniquely identify this conversation task.
  • model , the selected official OpenAI ChatGPT model.
  • output, the answer information provided by ChatGPT for the prompt words.
  • usage : statistical information on tokens for this Q&A session.
Among them, output contains ChatGPT’s answer information, and the output within it is ChatGPT, as can be seen in the figure.

As you can see, the content field in output contains the specific content of ChatGPT’s reply.

Streaming Responses

This API also supports streaming responses, which is very useful for web integration and can enable a word-by-word display effect on web pages. If you want to return responses as a stream, you can change the stream parameter in the request header to true. The changes are shown in the figure, but the calling code needs corresponding changes to support streaming responses.

After changing stream to true, the API will return the corresponding JSON data line by line. At the code level, we need to make corresponding changes to obtain line-by-line results. Python sample calling code:
The output is as follows:
As you can see, there are many data entries in the response, and the delta inside data is the latest response content, which is consistent with the content introduced above. delta is the newly added response content, and you can integrate it into your system according to the result. Streaming responses use response.completed or response.incomplete as the final state; the usage in the final state is the final token usage for this request and is also the basis for billing. If the client disconnects before the final state arrives, this request is recorded as client closed (499), and local estimated tokens will not be used for billing; if the connection ends normally but the final state and final usage are not received, this request is recorded as response incomplete (502), and estimated tokens will likewise not be used for billing. When either of these two situations occurs, please initiate the request again. The returned data result has multiple fields in total, described as follows:
  • item_id, the ID generated for this conversation task, used to uniquely identify this conversation task.
  • type, the type generated for this conversation Responses task.
  • model , the selected model from the official OpenAI ChatGPT website.
  • delta, the response information provided by ChatGPT for the prompt.
JavaScript is also supported. For example, the streaming call code for Node.js is as follows:
Java sample code:
Other languages can be adapted separately; the principle is the same.

Multi-turn Conversation

If you want to integrate multi-turn conversation functionality, you need to upload multiple prompts in the input field. A specific example of multiple prompts is shown in the image below:

Python sample call code:
By uploading multiple prompts, multi-turn conversations can be easily implemented, and the following response can be obtained:
As you can see, the information contained in output is consistent with the basic usage content. This contains the specific content of ChatGPT’s replies to multiple conversations, so corresponding questions can be answered based on multiple conversation contents.

Vision Model

gpt-4o is a multimodal large language model developed by OpenAI. It adds visual understanding capabilities on the basis of GPT-4. This model can process both text and image inputs simultaneously, achieving cross-modal understanding and generation. Text processing using the gpt-4o model is consistent with the basic usage content above. Below is a brief introduction to how to use the model’s image processing capabilities. The image processing capabilities of the gpt-4o model are mainly used by adding a type field to the original content content. Through this field, it can be determined whether the upload is text or an image, thereby enabling the image processing capabilities of the gpt-4o model. The following mainly describes how to call this feature using Curl and Python.
  • Curl script method
  • Python script method
Then the following result can be obtained. The field information in the result is consistent with the above. The details are as follows:
It can be seen that the response content is based on the image. Therefore, the text and image processing capabilities of the gpt-4.1 model can be easily used through the above two methods. In addition to gpt-4.1, there is also a lower-cost model called gpt-4o-mini. gpt-4o-mini is the latest generation large language model developed by OpenAI. It not only has a fast response speed, but is also more affordable and supports multimodality. For the use of the vision feature, refer to the usage content of the gpt-4.1 model above.

Creation of File Processing Models

Request example:
Example result:
As you can see, we also processed the input file, and the result is similar to the above.

Error Handling

When calling the API, if an error is encountered, the API will return the corresponding error code and information. 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 use the OpenAI Responses API to implement the official OpenAI Responses creation feature. We hope this document can help you better integrate and use this API. If you have any questions, please feel free to contact our technical support team.