> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bunny.build/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Official Bunny SDKs for Python, TypeScript, Java, and Go

<Tip>
  **Speed up integration with our SDKs**: Our official libraries make it easy to call the Bunny API from your favorite language, with retries, rate limit handling, and typed errors.
</Tip>

## <Icon icon="code" type="solid" /> What are the Bunny SDKs?

The Bunny SDKs are client libraries that wrap the API. They provide:

* **Simple interface**: `client.temporaryEmail.check()`, `client.ipClassify.check()`, `client.translate()`, and more
* **Retries and backoff**: Automatic retries on network errors and rate limits
* **Typed errors**: Exceptions for authentication, validation, rate limit, etc.
* **Input validation**: Client-side checks before calling the API

<Card title="Benefits of using our SDKs" icon="star" horizontal>
  - **Less boilerplate**: No need to manage headers, JSON, or retry logic yourself
  - **Type safety**: Full types in TypeScript, Python, Java, and Go
  - **Error handling**: Typed exceptions (e.g. `RateLimitError`, `ValidationError`)
  - **Consistent options**: Same base URL, timeout, retries across languages
</Card>

## <Icon icon="boxes-stacked" type="solid" /> Available SDKs

<Tabs>
  <Tab title="Backend">
    <CardGroup cols={2}>
      <Card title="Python" icon="python" color="#366B98" href="https://github.com/bunny-build/sdk-python">
        Official SDK for Python 3.8+, with httpx and pydantic.
      </Card>

      <Card title="TypeScript / Node.js" icon="node-js" color="#68A063" href="https://github.com/bunny-build/sdk-typescript">
        Official SDK for Node.js and TypeScript, ESM and CommonJS.
      </Card>

      <Card title="Java" icon="java" color="#E76F00" href="https://github.com/bunny-build/sdk-java">
        Official SDK for Java 11+, Maven/Gradle, builder pattern.
      </Card>

      <Card title="Go" icon="golang" color="#00ADD8" href="https://github.com/bunny-build/sdk-go">
        Official SDK for Go, stdlib net/http, context support.
      </Card>

      <Card title="PHP" icon="php" color="#7A86B8" href="https://github.com/bunny-build/sdk-php">
        Official SDK for PHP 8.1+, Composer, PSR-18 HTTP client.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>

## <Icon icon="terminal" type="solid" /> Usage examples

<CodeGroup>
  ```python Python theme={null}
  from bunnybuild import BunnyClient

  client = BunnyClient("bun_your_api_key")

  # Temporary email check
  result = client.temporary_email.check("user@tempmail.com")
  if result.is_disposable:
      print("Disposable domain:", result.domain)

  # IP classify
  result = client.ip_classify.check("8.8.8.8")
  print("Classification:", result.classification)

  # Translate
  result = client.translate(text="Hello world", from_lang="en", to="pt")
  print("Translated:", result.translated_text)
  ```

  ```javascript JavaScript / TypeScript theme={null}
  import { BunnyClient } from 'bunnybuild';

  const client = new BunnyClient('bun_your_api_key');

  const emailResult = await client.temporaryEmail.check('user@tempmail.com');
  if (emailResult.isDisposable) console.log('Disposable:', emailResult.domain);

  const ipResult = await client.ipClassify.check('8.8.8.8');
  console.log('Classification:', ipResult.classification);

  const translation = await client.translate({ text: 'Hello world', from: 'en', to: 'pt' });
  console.log('Translated:', translation.translatedText);
  ```

  ```java Java theme={null}
  BunnyClient client = BunnyClient.builder()
      .apiKey("bun_your_api_key")
      .build();

  TemporaryEmailResult emailResult = client.getTemporaryEmail().check("user@tempmail.com");
  if (emailResult.isDisposable()) { /* ... */ }

  IpClassifyResult ipResult = client.getIpClassify().check("8.8.8.8");
  ipResult.getClassification();
  ```

  ```go Go theme={null}
  client, _ := bunnybuild.NewClient("bun_your_api_key")
  ctx := context.Background()

  emailResult, _ := client.TemporaryEmail().Check(ctx, "user@tempmail.com")
  if emailResult.IsDisposable { /* ... */ }

  ipResult, _ := client.IpClassify().Check(ctx, "8.8.8.8")
  ipResult.Classification
  ```
</CodeGroup>

## <Icon icon="question-circle" type="solid" /> FAQ

<Accordion title="Where is the SDK source code?">
  Each SDK lives in its own GitHub repo under the `bunny-build` organization: `sdk-python`, `sdk-typescript`, `sdk-java`, `sdk-go`, `sdk-php`. You can install from the package manager or build from source.
</Accordion>

<Accordion title="Do SDKs support retries and rate limits?">
  Yes. All SDKs retry on network errors and on 429/5xx responses with exponential backoff, and they parse rate limit headers. You can also set a callback for rate limit updates.
</Accordion>

<Accordion title="What if my language is not supported?">
  You can call the API directly with HTTP. See the [API Reference](/api-reference/introduction) for all 13 endpoints, headers, and request/response formats.
</Accordion>
