OpenAI Chat Completion API Application and Usage

OpenAI ChatGPT is a powerful AI conversation system that can generate fluent, natural responses in just a few seconds with a prompt. ChatGPT stands out in the industry for its exceptional language understanding and generation capabilities. Today, ChatGPT is already widely used across industries and fields, and its influence continues to grow. Whether for everyday conversations, creative writing, professional consultation, or coding, ChatGPT can provide remarkable intelligent assistance, greatly improving human productivity and creativity.

This document mainly introduces the process for using the OpenAI Chat Completion API, which allows us to easily use the official OpenAI ChatGPT conversation features.

Compatible model requests accepted by the platform are billed based on the model's input, output, and cached usage. Chat Completions prompt_tokens includes cached tokens, and the reported cached portion is billed at the corresponding cache rate; switching API formats does not change billing to a fixed per-call charge. Charges are subject to the current model prices in the console and usage.cost in the response.

Send a Conversation Message

Open the application list, go to General Application, and click the copy button next to API KEY. Put the copied raw value into the environment variable below, then send a user message. When using a restricted key, make sure it permits Chat Completions.

export ACEDATACLOUD_API_KEY='YOUR_API_KEY'
curl --fail-with-body 'https://api.acedata.cloud/openai/chat/completions' \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"model":"gpt-6-luna","messages":[{"role":"user","content":"Hello!"}]}'

Read the reply from choices[0].message.content in the response. Below is an existing response; the actual text, model, and usage depend on your request.

{
  "id": "chatcmpl-Cmd6uwSxN75F4PAdQSFEO8f2QPs4E",
  "object": "chat.completion",
  "created": 1765706120,
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! What can I help you with today?",
        "refusal": null,
        "annotations": []
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 7,
    "completion_tokens": 13,
    "total_tokens": 20,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "audio_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0,
      "audio_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  },
  "service_tier": "default",
  "system_fingerprint": null
}

id identifies this request, and usage records token usage. If an error is returned, check the key, balance, or request parameters using the code and message.

GPT-6.2 Astra and GPT-6.2 Sol

Use model: "gpt-6.2-astra" or model: "gpt-6.2-sol" to select the model. Text and image inputs and text output are supported. It is recommended to start with reasoning_effort: "low"; low, medium, high, xhigh, and max are supported, while none and minimal are not. For tool calls and structured output, use the public parameter format for the corresponding API.

The official context window is 1,050,000 tokens, with a maximum input of 922,000 and a maximum output of 128,000; actual requests must also meet this API's parameter and account limits. When input exceeds 272,000 tokens, long-context rates apply to the entire request: input and cache rates are twice the base rates, and output is 1.5 times the base rate. Prices and charges are subject to the current model prices in the console, the selected plan, and actual usage.

GPT-6.1 Terra

Use model: "gpt-6.1-terra" to select this model. Text and image inputs and streaming output are supported; use function tools and structured output according to this API's parameter format. The supported reasoning levels are low, medium, high, xhigh, and max; it is recommended to start with reasoning_effort: "low". none and minimal are not supported. Long-context pricing applies when input exceeds 272,000 tokens; actual charges are subject to the current prices in the console and the usage in the response.

GPT-6.1 Sol

Use model: "gpt-6.1-sol" to select this model. Streaming output, function calling, structured output, and image input are supported. During the first week after launch, access is limited to verified ACE T1+ holders (at least 100,000 ACE) or authorized users; the exact availability period is subject to the access notice in the console.

The supported reasoning levels are low, medium, high, xhigh, and max; none and minimal are not currently supported. It is recommended to start with reasoning_effort: "low". When input exceeds 272,000 tokens, long-context pricing applies to the entire request; charges are subject to the current prices in the console.

Debug in the Console

Open Chat Completions Online Debugging, select an application under authorization, fill in model and messages, and click “Try”. Copyable call code will be generated on the right.

Common optional parameters:

  • max_tokens: Limits the maximum number of tokens in a single reply.
  • temperature: Generation randomness, between 0 and 2; higher values produce more varied results.
  • n: The number of candidate replies to generate at once.
  • response_format: Return format settings.

After execution, the console will display a JSON response in the same format.

As you can see, the content field inside choices contains the specific content of ChatGPT's reply.

Streaming Responses

This API also supports streaming responses, which is very useful for web integration and allows a webpage to display text character by character.

If you want to return the response as a stream, you can change the stream parameter in the request header to true.

Make the change as shown in the image, although the call code also needs corresponding changes to support streaming responses.

After changing `stream` to `true`, the API will return the corresponding JSON data line by line, and we need to make corresponding changes to the code to obtain the results line by line.

Python sample call code:

import requests

url = "https://api.acedata.cloud/openai/chat/completions"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "model": "gpt-4",
    "messages": [{"role":"user","content":"hello"}],
    "stream": True
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

The output is as follows:

data: {"choices": [{"delta": {"role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": "Hi", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " there", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": "!", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " How", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " can", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " I", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " assist", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " you", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": " today", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"content": "?", "role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"role": "assistant"}, "index": 0}], "created": 1721007348, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: {"choices": [{"delta": {"role": "assistant"}, "finish_reason": "stop", "index": 0}], "created": 1721007349, "id": "chatcmpl-YzczYjVhNjhjMzMwNDQ5MDkyNGYzOGZjZGE1ZGQ5OGU", "model": "gpt-4", "object": "chat.completion.chunk", "recipient": "all"}

data: [DONE]

As you can see, the response contains many data entries, and the choices in each data entry contains the latest response content, consistent with what was described above. choices contains the newly added response content, which you can integrate into your system based on the results. At the same time, the end of the streaming response is determined by the content of data; if the content is [DONE], it means that the streaming response has finished completely. The returned data results contain several fields, described as follows:

  • id, the ID generated for this conversation task, used to uniquely identify it.
  • model , the selected model from the official OpenAI ChatGPT website.
  • choices, the response information ChatGPT provides for the prompt.

JavaScript is also supported; for example, the Node.js streaming call code is as follows:

const options = {
  method: "post",
  headers: {
    accept: "application/json",
    authorization: "Bearer {token}",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-4",
    messages: [{ role: "user", content: "hello" }],
    stream: true,
  }),
};

fetch("https://api.acedata.cloud/openai/chat/completions", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));

Java sample code:

JSONObject jsonObject = new JSONObject();
jsonObject.put("model", "gpt-4");
jsonObject.put("messages", [{"role":"user","content":"hello"}]);
jsonObject.put("stream", true);
MediaType mediaType = "application/json; charset=utf-8".toMediaType();
RequestBody body = jsonObject.toString().toRequestBody(mediaType);
Request request = new Request.Builder()
  .url("https://api.acedata.cloud/openai/chat/completions")
  .post(body)
  .addHeader("accept", "application/json")
  .addHeader("authorization", "Bearer {token}")
  .addHeader("content-type", "application/json")
  .build();

OkHttpClient client = new OkHttpClient();
Response response = client.newCall(request).execute();
System.out.print(response.body!!.string())

You can adapt the code for other languages yourself; the principle is the same.

Multi-turn Conversations

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

Python sample invocation code:

import requests

url = "https://api.acedata.cloud/openai/chat/completions"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "model": "gpt-4",
    "messages": [{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi! How can I assist you today?"},{"role":"user","content":"What I say just now?"}]
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

By uploading multiple prompts, you can easily implement multi-turn conversations and obtain a response like the following:

{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "You said, \"Hello.\""
      },
      "finish_reason": "stop"
    }
  ],
  "created": 1721323012,
  "id": "chatcmpl-NWZmOTA5MDlkZjBjNDRjNGEwMzRjYzA5NmM1MzQwMWY",
  "model": "gpt-4",
  "object": "chat.completion.chunk",
  "recipient": "all",
  "usage": {
    "prompt_tokens": 31,
    "completion_tokens": 6,
    "total_tokens": 37
  }
}

As you can see, the information in choices is consistent with that in the basic usage example. It contains the specific content of ChatGPT's response to the multiple conversation messages, so it can answer the corresponding question based on those messages.

Integrating OpenAI-Python

The OpenAI Chat Completion API is compatible with the official OpenAI interface, so you can integrate it directly using the official SDK OpenAI-Python. This article briefly introduces how to use it.

  1. First, set up a local Python environment. You can search Google for this process.
  2. Download and install a development environment, such as the VSCode editor.
  3. Configure the OpenAI environment variables.
  • In the project folder, create and save a file named .env
  • Contents of the .env file:
OPENAI_API_KEY="sk-xxx"
OPENAI_BASE_URL="https://api.acedata.cloud/openai"  # 再次提醒:如果你使用官网OpenAI的key,不要用这个地址。

Replace sk-xxx with your own key. OPENAI_BASE_URL is the proxy endpoint for accessing OpenAI.

  1. Install the packages required by the project
pip install openai

On Mac OS, the command is:

pip3 install openai
  1. Create a sample source code file

Suppose we create a sample code file named index.py, with the following contents:

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))

response = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "hello",
        }
    ],
    model="gpt-4",
)

print(response.text)

Browsing Models

The gpt-3.5-browsing and gpt-4-browsing models differ from other models: they can search the web based on a prompt and return appropriately adjusted search results to you. This article will demonstrate the browsing functionality through a specific example. You can then fill in the corresponding content on the OpenAI Chat Completion API interface, as shown below:

You can also see the corresponding invocation code generated on the right. You can copy the code and run it directly, or click the “Try” button to test it.

After making the call, we find that the result is as follows:

{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "For the latest news in China today, you can check major news websites such as:\n\n- [BBC News China](https://www.bbc.com/news/world/asia/china)\n- [CNN China News](https://edition.cnn.com/china)\n- [Reuters China](https://www.reuters.com/news/archive/china-news)\n\nThese sources will have up-to-date information on current events in China."
      },
      "finish_reason": "stop"
    }
  ],
  "created": 1721009347,
  "id": "chatcmpl-YzA0M2RjZDVkYThlNDkxNTkzOThmZWQ4OGMzNzdhNzA",
  "model": "gpt-4-browsing",
  "object": "chat.completion.chunk",
  "recipient": "all",
  "usage": {
    "prompt_tokens": 325,
    "completion_tokens": 82,
    "total_tokens": 407
  }
}

As you can see, the response in choices is based on a web search and also provides relevant links. The response in choices should be rendered using markdown syntax to provide the best experience. Finally, this also demonstrates the powerful advantage of our model's browsing functionality.

Vision Model

gpt-4o is a multimodal large language model developed by OpenAI that adds visual understanding capabilities to GPT-4. This model can process both text and image inputs, enabling cross-modal understanding and generation.

Text processing with the gpt-4o model is consistent with the basic usage described above. Below is a brief introduction to using the model's image processing capabilities.

The image processing capabilities of the gpt-4o model are primarily used by adding a type field to the existing content. This field indicates whether the uploaded content is text or an image, enabling the use of the gpt-4o model's image processing capabilities. The following mainly describes two ways to call this functionality, using Curl and Python.

  • Curl script method
curl -X POST 'https://api.acedata.cloud/openai/chat/completions' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "What'\''s in this image?"
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
            }
          }
        ]
      }
    ]
  }'
  • Python script method
import requests

url = "https://api.acedata.cloud/openai/chat/completions"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "model": "gpt-4o",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text", "text": "What's in this image?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
                    }
                },
            ],
        }
    ]
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

You can then get the following result. The field information in the result is consistent with the above, as shown below:

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "gpt-4-vision-preview",
  "system_fingerprint": "fp_44709d6fcb",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "\n\nThis image shows a wooden boardwalk extending through a lush green marshland."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
  }
}

You can see that the response is based on the image, so you can easily use the text and image processing capabilities of the gpt-4-vision model through the two methods above.

Besides gpt-4o, there is a lower-cost model called gpt-4o-mini. gpt-4o-mini is the latest generation of large language models developed by OpenAI. It not only responds quickly but is also cheaper and supports multimodal input. For information on using the vision feature, refer to the instructions for using the gpt-4o model above.

GPT-4o Image Generation Model

Generating an Image from a Reference Image

Below is an example of generating an image in a custom style based on an image. First, let's look at the image we input, as shown below:

You can see that the reference image is a photo of a real person. We can change its style, for example, by turning it into an anime-style image. The specific request example is:

{
  "model": "gpt-4o-image",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "生成动漫风格的图片,并且带上个帽子"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://cdn.acedata.cloud/qzx2z1.png"
          }
        }
      ]
    }
  ],
  "stream": false
}

Example result:

{
  "id": "chatcmpl-89DPQxbLuyRNzH5YLCPYM5WElV3dm",
  "object": "chat.completion",
  "created": 1781020664,
  "model": "gpt-4o-image",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "\n\n> 🎨 生成中...\n\n![https://platform.cdn.acedata.cloud/20260609/0f7b6cf1b14843b1bab8e261fe5765b3.png](https://platform.cdn.acedata.cloud/20260609/0f7b6cf1b14843b1bab8e261fe5765b3.png)\n\n[点击下载](https://platform.cdn.acedata.cloud/download/20260609/0f7b6cf1b14843b1bab8e261fe5765b3.png)"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 100,
    "completion_tokens": 122,
    "total_tokens": 222,
    "prompt_tokens_details": {
      "text_tokens": 93,
      "cached_tokens_details": {}
    },
    "completion_tokens_details": {}
  }
}

The message.content in choices is the complete generated conversation result, and the image is included in Markdown format (the image link is temporary, so please download and save it promptly). You can see that the generated image is indeed in an anime style, as shown below:

Generating an Image from Text Only

We can use a prompt to generate an image and have it returned to us as a conversational result. Below, we use Create an image of a sunset over a futuristic city as an example. The specific example is below:

{
  "model": "gpt-4o-image",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "创建一张未来城市日落的图片"
        }
      ]
    }
  ],
  "stream": false
}

Example result:

{
  "id": "chatcmpl-89DqkpQoPGkQqJ6kPKMKWejjLXVxQ",
  "object": "chat.completion",
  "created": 1781020587,
  "model": "gpt-4o-image",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "\n\n> 🎨 生成中...\n\n![https://platform.cdn.acedata.cloud/20260609/ed2cca68732540fc99162ddc10ddc153.png](https://platform.cdn.acedata.cloud/20260609/ed2cca68732540fc99162ddc10ddc153.png)\n\n[点击下载](https://platform.cdn.acedata.cloud/download/20260609/ed2cca68732540fc99162ddc10ddc153.png)"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 17,
    "completion_tokens": 104,
    "total_tokens": 121,
    "prompt_tokens_details": {
      "text_tokens": 10,
      "cached_tokens_details": {}
    },
    "completion_tokens_details": {}
  }
}

You can see that the result matches the prompt, as shown below:

Generating 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 an image of coffee, we can generate an image of the handsome man drinking coffee. Below are the specific reference images:

Below, we use Generate a boy holding a coffee and about to drink it as an example. The specific example is as follows:

{
  "model": "gpt-4o-image",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "生成男生举着咖啡,并且马上要喝的样子"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://cdn.acedata.cloud/pqquv3.jpg"
          }
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://cdn.acedata.cloud/h8j2i0.jpg"
          }
        }
      ]
    }
  ],
  "stream": false
}

Sample result:

{
  "id": "chatcmpl-89DnHbbzOIQvU1VzJrNjzMU8BRUgG",
  "object": "chat.completion",
  "created": 1781021018,
  "model": "gpt-4o-image",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "\n\n> 🎨 生成中...\n\n![https://platform.cdn.acedata.cloud/20260610/f1d9ddee3c304230a9f92929f04b95be.png](https://platform.cdn.acedata.cloud/20260610/f1d9ddee3c304230a9f92929f04b95be.png)\n\n[点击下载](https://platform.cdn.acedata.cloud/download/20260610/f1d9ddee3c304230a9f92929f04b95be.png)"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 193,
    "completion_tokens": 116,
    "total_tokens": 309,
    "prompt_tokens_details": {
      "text_tokens": 186,
      "cached_tokens_details": {}
    },
    "completion_tokens_details": {}
  }
}

As you can see, the generated result was indeed created by combining the two images. The specific result is as follows:

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

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Conclusion

Through this document, you have learned how to easily implement the conversation functionality of the official OpenAI ChatGPT using the OpenAI Chat Completion 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.