Skip to main content

SDK Download and Usage

Official SDKs​

We provide official SDKs for multiple programming languages to help you easily integrate with the I Hate PPT API.

πŸ‘‰ Download SDKs

Python SDK​

Installation​

pip install aippt-python

Quick Start​

from aippt import AIPPTClient

# Initialize client
client = AIPPTClient(api_key="your_api_key")

# Generate PPT
result = client.generate_ppt(
topic="AI Development Trends",
mode="quick",
language="en"
)

print(f"PPT ID: {result.ppt_id}")
print(f"Download URL: {result.download_url}")

Advanced Usage​

# Intelligent editing mode
result = client.generate_ppt(
topic="Product Launch",
mode="intelligent",
language="en",
options={
"audience": "investors",
"duration": 30,
"style": "professional"
}
)

# Document import
result = client.import_document(
file_path="presentation.docx",
options={
"extract_images": True,
"preserve_formatting": True
}
)

# Edit PPT
client.edit_ppt(
ppt_id=result.ppt_id,
instructions="Simplify the content on page 3 and add more data support"
)

JavaScript SDK​

Installation​

npm install aippt-js

Quick Start​

import { AIPPTClient } from 'aippt-js';

// Initialize client
const client = new AIPPTClient('your_api_key');

// Generate PPT
const result = await client.generatePPT({
topic: 'AI Development Trends',
mode: 'quick',
language: 'en'
});

console.log(`PPT ID: ${result.pptId}`);
console.log(`Download URL: ${result.downloadUrl}`);

Advanced Usage​

// Intelligent editing mode
const result = await client.generatePPT({
topic: 'Product Launch',
mode: 'intelligent',
language: 'en',
options: {
audience: 'investors',
duration: 30,
style: 'professional'
}
});

// Document import
const result = await client.importDocument({
file: fileInput.files[0],
options: {
extractImages: true,
preserveFormatting: true
}
});

// Edit PPT
await client.editPPT(result.pptId, {
instructions: 'Simplify the content on page 3 and add more data support'
});

Java SDK​

Installation​

<dependency>
<groupId>com.ihateppt</groupId>
<artifactId>aippt-java</artifactId>
<version>1.0.0</version>
</dependency>

Quick Start​

import com.ihateppt.AIPPTClient;
import com.ihateppt.models.GeneratePPTRequest;
import com.ihateppt.models.GeneratePPTResponse;

// Initialize client
AIPPTClient client = new AIPPTClient("your_api_key");

// Generate PPT
GeneratePPTRequest request = GeneratePPTRequest.builder()
.topic("AI Development Trends")
.mode("quick")
.language("en")
.build();

GeneratePPTResponse response = client.generatePPT(request);
System.out.println("PPT ID: " + response.getPptId());
System.out.println("Download URL: " + response.getDownloadUrl());

Ready to integrate with your app?

Get started with our powerful API and SDK. Build amazing presentation features into your own applications.

View API Docs

PHP SDK​

Installation​

composer require ihateppt/aippt-php

Quick Start​

<?php
require_once 'vendor/autoload.php';

use IHatePPT\AIPPTClient;

// Initialize client
$client = new AIPPTClient('your_api_key');

// Generate PPT
$result = $client->generatePPT([
'topic' => 'AI Development Trends',
'mode' => 'quick',
'language' => 'en'
]);

echo "PPT ID: " . $result['ppt_id'] . "\n";
echo "Download URL: " . $result['download_url'] . "\n";
?>

Community SDKs​

Go SDK​

go get github.com/ihateppt/aippt-go
package main

import (
"fmt"
"github.com/ihateppt/aippt-go"
)

func main() {
client := aippt.NewClient("your_api_key")

result, err := client.GeneratePPT(aippt.GeneratePPTRequest{
Topic: "AI Development Trends",
Mode: "quick",
Language: "en",
})

if err != nil {
panic(err)
}

fmt.Printf("PPT ID: %s\n", result.PPTID)
fmt.Printf("Download URL: %s\n", result.DownloadURL)
}

Ruby SDK​

gem install aippt-ruby
require 'aippt'

client = AIPPT::Client.new('your_api_key')

result = client.generate_ppt(
topic: 'AI Development Trends',
mode: 'quick',
language: 'en'
)

puts "PPT ID: #{result.ppt_id}"
puts "Download URL: #{result.download_url}"

SDK Features​

Unified Interface​

All SDKs provide a unified interface design, ensuring consistency across different languages.

Automatic Retry​

Built-in automatic retry mechanism to handle network errors and temporary failures.

Type Safety​

Complete type definitions for compile-time type checking.

Async Support​

Support for asynchronous operations to improve application performance.

Error Handling​

Unified error handling mechanism for easier debugging and troubleshooting.

Configuration Options​

Basic Configuration​

client = AIPPTClient(
api_key="your_api_key",
base_url="https://api.ihateppt.com/v1", # Optional
timeout=30, # Request timeout in seconds
retry_count=3, # Number of retries
retry_delay=1 # Retry delay in seconds
)

Advanced Configuration​

client = AIPPTClient(
api_key="your_api_key",
config={
"timeout": 30,
"retry_count": 3,
"retry_delay": 1,
"rate_limit": True,
"debug": False,
"user_agent": "MyApp/1.0"
}
)

Example Projects​

Complete Examples​

We provide complete example projects demonstrating SDK usage:

Integration Examples​

  • Web Application Integration: Shows how to integrate SDK in web applications
  • Mobile Application Integration: Shows how to integrate SDK in mobile applications
  • Desktop Application Integration: Shows how to integrate SDK in desktop applications

Support and Help​

Documentation Resources​

Technical Support​

  • GitHub Issues: Report issues and feature requests
  • Stack Overflow: Ask questions using the ihateppt tag
  • Community Forum: Exchange with other developers
  • Email Support: sdk-support@ihateppt.com

Ready to integrate with your app?

Get started with our powerful API and SDK. Build amazing presentation features into your own applications.

View API Docs

Get Started with SDK - Choose the SDK that fits your project and check out the corresponding documentation and examples.

Available API Endpoints​

Authentication​

  • POST /v1/auth/api-key
  • POST /v1/auth/oauth/token
  • POST /v1/auth/login
  • POST /v1/auth/refresh

Ppt​

  • POST /v1/ppt/generate
  • POST /v1/ppt/{ppt_id}/edit
  • POST /v1/ppt/import
  • POST /v1/ppt/batch-generate

Files​

  • POST /v1/files/upload
  • GET /v1/files/{file_id}/download

Webhooks​

  • POST /v1/webhooks
  • POST /v1/webhooks/test

Usage​

  • GET /v1/usage/stats