# Self Generated SDK'S

Our SDK generation feature allows you to create SDKs tailored to your specific requirements.

### Downloading the Torus Developer API YAML

To obtain the YAML file, visit the following link:

<https://connects.torusdigital.com/api/v1/docs>[​](https://upstox.com/developer/api-documentation/self-generated-sdk#offline-sdk-generation-using-swagger-codegen-cli)

### Offline SDK Generation Using Swagger Codegen CLI <a href="#offline-sdk-generation-using-swagger-codegen-cli" id="offline-sdk-generation-using-swagger-codegen-cli"></a>

1. Download the latest jar file from  [`Maven Repository`](https://mvnrepository.com/artifact/io.swagger.codegen.v3/swagger-codegen-cli)

**Note**: OpenAPI 3.0 is supported only by Swagger Codegen CLI versions 3.x

Execute the below command to generate the client in a preferred language.

2. **Generate the SDK**:  Using the online API documentation:

{% code overflow="wrap" %}

```
java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://connects.torusdigital.com/api/v1/docs -l go -o c:\temp\go_api_client                                                                                     
```

{% endcode %}

* &#x20;Using the downloaded YAML file:

<pre data-overflow="wrap" data-full-width="false"><code><strong>java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i swagger.yaml -l go -o c:\temp\go_api_client
</strong></code></pre>

#### SDK Generation on macOS[​](https://upstox.com/developer/api-documentation/self-generated-sdk/#mac) <a href="#mac" id="mac"></a>

1. **Install Swagger Codegen**:

&#x20;        `brew install swagger-codegen`&#x20;

2. **Generate the SDK**:

Using the online API documentation:

`swagger-codegen generate -i https://connects.torusdigital`.`com -l go -o go_api_client`

Using the downloaded YAML file:

`swagger-codegen generate -i swagger.yaml -l go -o go_api_client`

Command Line TIP

`-h`, `--help`: Displays help messages and exits.\
`-l`, `--lang`: Specifies the programming language for the generated SDK.\
`-o`, `--output`: Specifies the output directory for the generated files (default is the current directory).\
`-i`, `--input-spec`: Specifies the location of the Swagger specification, either as a URL or a file (required).

### Online SDK generation using Swagger editor[​](https://upstox.com/developer/api-documentation/self-generated-sdk/#online-sdk-generation-using-swagger-editor) <a href="#online-sdk-generation-using-swagger-editor" id="online-sdk-generation-using-swagger-editor"></a>

* Open your web browser and go to [swagger editor](https://editor.swagger.io/).
* From the File menu, select "Import File".
* import the downloaded YAML file.
* Click on "Generate Client" and select your preferred programming language
* Download the generated ZIP file and extract it to use your SDK.
* Each SDK comes with a readme file to know how to install and use SDK.
