Getting Started

Start using Placewise Image API in minutes. Get high-quality stock images and AI-generated images delivered via simple HTTP requests.

Your First Request

The simplest way to get an image is to make a GET request with your search query:

Path format (recommended):

GET https://img.placewise.io/800x600-mountains

Query params format:

GET https://img.placewise.io?w=800&h=600&q=mountains

💡 Path format: Use img.placewise.io/800x600-mountains for clean URLs

Live Examples

You can use the API directly in HTML <img> tags:

Stock Photos

Code:

<img 
  src="https://img.placewise.io/400x300-sunset"
  alt="Beautiful sunset"
  loading="lazy"
/>

Result:

Beautiful sunset

AI-Generated Images

Code:

<img 
  src="https://img.placewise.io/400x300-sunset?provider=ai&style=photo"
  alt="AI sunset"
  loading="lazy"
/>

Result:

✨ AI-Generated

✨ AI Generation: Add ?provider=ai&style=photo to generate custom images. Requires authentication.

Basic Parameters

ParameterTypeRequiredDescription
qstring✅ YesSearch term for the image (e.g., "mountains", "coffee")
wnumber✅ YesImage width in pixels (1-4000)
hnumber✅ YesImage height in pixels (1-4000)
api_keystring⚪ OptionalYour API key for authenticated requests (see Authentication)

⚠️ Rate Limits: Anonymous requests are limited to 10 requests per hour. For higher limits, create an account and get an API key.

Code Examples

JavaScript / TypeScript

// Path format (clean URLs)
const imageUrl = 'https://img.placewise.io/800x600-nature';

// Query params format
const imageUrl = 'https://img.placewise.io?w=800&h=600&q=nature';

// With authentication
const imageUrl = 'https://img.placewise.io/800x600-nature?api_key=pk_live_YOUR_KEY';

// React component
function ImageComponent() {
  const query = 'mountains';
  const imageUrl = `https://img.placewise.io/800x600-${query.replace(/ /g, '-')}`;
  return <img src={imageUrl} alt="Mountains" loading="lazy" />;
}

Python

import requests

# Path format (clean URLs)
image_url = 'https://img.placewise.io/800x600-mountains'

# Query params format with auth
response = requests.get(
    'https://img.placewise.io',
    params={
        'w': 800,
        'h': 600,
        'q': 'mountains',
        'api_key': 'pk_live_YOUR_KEY'
    }
)

print(f"Image URL: {response.url}")

cURL

# Path format (clean URLs)
curl "https://img.placewise.io/800x600-mountains"

# With authentication
curl "https://img.placewise.io/800x600-mountains?api_key=pk_live_YOUR_KEY"

# Download image directly
curl -o image.jpg "https://img.placewise.io/1920x1080-sunset-beach"