After you develop an API, you can generate an SDK and a usage guide document in the console with a few clicks. This simplifies the use and integration of the API as you do not need to write any additional code to call the API.
Prerequisites
An API is created and an operation is added to it. For more information, see Create a REST API and add an operation to it.
Procedure
Log on to the Cloud-native API Gateway console.
Make the system generate SDKs and documentation for APIs within instances and outside instances.
In the left-side navigation pane, click API. In the top navigation bar, select a region.
APIs within instances
In the left-side navigation pane, click Instance. In the top navigation bar, select a region.
On the Instance page, click the instance that you want to manage.
In the left-side navigation tree, click API. Then, click the REST API that you want to manage.
APIs outside instances
In the left-side navigation pane, click API. In the top navigation bar, select a region.
Click the REST API that you want to manage.
On the page that appears, choose in the upper-right corner.

In the Generate SDK & Documentation dialog box, configure the parameters and click Generate and Download.
Parameter
Description
API Version
Select the version of the API for which you want to generate the SDK and documentation.
NoteThis option is unavailable for APIs created within instances because versioning is not provided for these APIs.
This option is available for APIs created outside instances if versioning is enabled for the APIs during API creation. If versioning is not enabled for the APIs, this option is still unavailable for the APIs.
Language
Select the language in which you want to generate the SDK. Valid values: Java, Golang, Python, Node.js, TypeScript, and Swift.
Wait until the SDK and documentation are generated and automatically downloaded. They are automatically downloaded as a compressed package to your local computer. Then, go to the download path of the browser to view the package.
NoteAfter you decompress the package, you can find the
README.mdfile in the package. This file provides instructions on the use of the SDK.