SimplyPNG/Documentation

Quick Start

Get up and running with the SimplyPNG API in 5 minutes.

1

Get an API Key

Create an API key from the developer console. You'll need this to authenticate your requests.

Get API Key
2

Make Your First Request

Send a POST request with your image to create a background removal job. You can provide the image as a URL (recommended for large files up to 30MB) or base64 data (max ~4MB).

cURL (URL input - recommended)

curl -X POST https://api.simplypng.app/api/v1/jobs \
  -H "Authorization: Bearer sp_test_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://your-storage.com/photo.jpg",
    "output_mode": "download_url"
  }'

JavaScript (URL input)

const response = await fetch('https://api.simplypng.app/api/v1/jobs', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sp_test_YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    image: 'https://your-storage.com/photo.jpg',  // URL recommended for large images
    output_mode: 'download_url',
  }),
});

const { job } = await response.json();
console.log('Job ID:', job.id);
console.log('Status:', job.status);

Python (URL input)

import requests

# URL input - recommended for large images (up to 30MB)
response = requests.post(
    'https://api.simplypng.app/api/v1/jobs',
    headers={
        'Authorization': 'Bearer sp_test_YOUR_API_KEY',
        'Content-Type': 'application/json',
    },
    json={
        'image': 'https://your-storage.com/photo.jpg',
        'output_mode': 'download_url',
    }
)

job = response.json()['job']
print(f"Job ID: {job['id']}")
print(f"Status: {job['status']}")

Tip: URL input supports up to 30MB. For base64 input, use data:image/png;base64,... format (max ~4MB).

3

Poll for Results

Check the job status until it's complete, then download the result.

// Poll until complete
let status = 'running';
while (status === 'running' || status === 'pending') {
  await new Promise(r => setTimeout(r, 2000)); // Wait 2 seconds
  
  const res = await fetch(`https://api.simplypng.app/api/v1/jobs/${job.id}`, {
    headers: { 'Authorization': 'Bearer sp_test_YOUR_API_KEY' }
  });
  
  const data = await res.json();
  status = data.job.status;
  
  if (status === 'succeeded') {
    console.log('Result URL:', data.job.result.url);
    // Download or use the transparent PNG
  }
}

You're all set!

You've successfully integrated SimplyPNG into your application. Check out the API Reference for more options and advanced features.