npm package: @sptzx/sdk
Description: Universal SDK for all Siputzx service APIs. Works seamlessly on Edge, Bun, and Node.js.
Author: Siputzx Team
Latest version: 1.0.2

<div align="center">
<img src="https://raw.githubusercontent.com/apisku/.github/refs/heads/main/file_00000000294c62068c6013d845640f01%20(1).png" alt="Siputzx" width="300" />
</div>

# @sptzx/sdk

Universal SDK for all Siputzx service APIs. Works seamlessly on Edge, Bun, and Node.js.

## What is Siputzx SDK?

The Siputzx SDK is a powerful and versatile library that simplifies the integration of various Siputzx services into your applications. It is designed to be a universal SDK, meaning it can be used in different JavaScript environments, including server-side (Node.js), edge computing platforms, and modern JavaScript runtimes like Bun.

The SDK is built with TypeScript, providing type safety and autocompletion to enhance the development experience. It dynamically generates API clients from OpenAPI specifications, ensuring that the SDK is always up-to-date with the latest API changes. This approach eliminates the need for manual updates and reduces the risk of breaking changes.

The Siputzx SDK offers two main API clients:

*   **SiputzxAPI:** A comprehensive client for the primary Siputzx services. It includes features like automatic server rotation and retries, ensuring high availability and reliability.
*   **BratAPI:** A specialized client for the Brat service, which is focused on media-related functionalities.

Whether you are building a web application, a mobile app, or a backend service, the Siputzx SDK provides a consistent and straightforward way to interact with the Siputzx ecosystem.

---

<div align="center">

**Language**
</br>
<a href="README.md"> English </a>
<span> | </span>
<a href="README.id.md"> Indonesian </a>

</div>

---

<div align="center">

![NPM Version](https://img.shields.io/npm/v/@sptzx/sdk?style=for-the-badge)
![NPM Downloads](https://img.shields.io/npm/dt/@sptzx/sdk?style=for-the-badge)
![NPM License](https://img.shields.io/npm/l/@sptzx/sdk?style=for-the-badge)

</div>

---

## Installation

```bash
npm install @sptzx/sdk
```

## Usage

### SiputzxAPI Example

```javascript
import { InitSiputzx, listSiputzxServices } from '@sptzx/sdk';

async function main() {
  // Initialize the SDK
  await InitSiputzx();

  // List available services
  const services = listSiputzxServices();
  console.log(services);
}

main();
```

### BratAPI Example

```javascript
import { InitBrat, listBratServices } from '@sptzx/sdk';

async function main() {
  // Initialize the SDK
  await InitBrat();

  // List available services
  const services = listBratServices();
  console.log(services);
}

main();
```

## Community

Join our community to get support and stay up-to-date with the latest news.

*   **WhatsApp Channel:** [https://whatsapp.com/channel/0029Vaq9pCUEawdzlDYdYF3p](https://whatsapp.com/channel/0029Vaq9pCUEawdzlDYdYF3p)
*   **Telegram Channel:** [https://t.me/siputzxapi](https://t.me/siputzxapi)
*   **WhatsApp Group:** [https://chat.whatsapp.com/K0Thkzw0iLgE6oWxopBQmA?mode=wwt](https://chat.whatsapp.com/K0Thkzw0iLgE6oWxopBQmA?mode=wwt)
*   **Discord Server:** [https://discord.gg/qWNtQMeB](https://discord.gg/qWNtQMeB)

## Documentation

For full documentation, please visit [docs.siputzx.my.id](https://docs.siputzx.my.id).