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-mountainsQuery 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:
AI-Generated Images
Code:
<img src="https://img.placewise.io/400x300-sunset?provider=ai&style=photo" alt="AI sunset" loading="lazy" />
Result:
✨ AI Generation: Add ?provider=ai&style=photo to generate custom images. Requires authentication.
Basic Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | ✅ Yes | Search term for the image (e.g., "mountains", "coffee") |
w | number | ✅ Yes | Image width in pixels (1-4000) |
h | number | ✅ Yes | Image height in pixels (1-4000) |
api_key | string | ⚪ Optional | Your 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"
Next Steps
✨ AI Playground →
Try AI image generation with different styles and variations
Try the Playground →
Test the stock image API interactively with live examples
Authentication Guide →
Get API keys and unlock AI generation features
Full API Reference →
Complete documentation of all parameters and AI styles
AI Examples →
Explore AI styles, variations, and alternatives
Code Examples →
Real-world examples in multiple languages and frameworks
On This Page