Imageslot API Documentation & Reference

Instantly generate, resize, and format images with the Imageslot REST API. Built for developers, designers, and automation—use simple endpoints for dynamic placeholder images, production-ready assets, and more. Jump to endpoints ↓

Developer exploring API documentation for image generation and manipulation

Getting Started with the Imageslot API

The Imageslot API enables you to generate, resize, and format placeholder or custom images on demand via HTTP requests. No signup or authentication is required for basic usage—just construct a URL and call it from your app, website, or design tool. Advanced features or higher usage tiers may require an API key. See the FAQ for details.

  • Base URL: https://imageslot.com/v1/
  • HTTP Methods: GET for all endpoints
  • Output Formats: PNG, JPG, JPEG, GIF (set with filetype parameter)
  • Max Size: Up to 2000x2000 pixels per image (see parameters)
Tip: You can use Imageslot API URLs directly in <img> tags, CSS backgrounds, Figma, WordPress, React, and more—no coding required!

Endpoint Image Generation

GET https://imageslot.com/v1/{width}x{height}

Dynamically generate a placeholder or custom image at any size, with customizable background, text, format, font size, styles, and more.

Name Type Required Description Example
widthintYesImage width in pixels (min 50, max 2000)800
heightintYesImage height in pixels (min 50, max 2000)450
filetypestringNoImage format: png, jpg, jpeg, gifpng
bgstringNoBackground color (hex, no #, or 'transparent' for PNG)173559
fgstringNoText color (hex, no #)ffffff
textstringNoOverlay text (max 64 chars, use + for spaces)Hello+World
shadowstringNoShadow color (hex, no #)23272F
fontsizeintNoFont size in px (8-128)36
bold1/0No1 for bold text1
italic1/0No1 for italic text1
curl "https://imageslot.com/v1/800x450?bg=173559&fg=ffffff&text=Hello+World&filetype=png" --output image.png
fetch('https://imageslot.com/v1/800x450?bg=173559&fg=ffffff&text=Hello+World&filetype=png')
  .then(r => r.blob())
  .then(blob => {
    // Use blob in your app or display in <img>
  });
import requests
url = 'https://imageslot.com/v1/800x450?bg=173559&fg=ffffff&text=Hello+World&filetype=png'
resp = requests.get(url)
with open('image.png', 'wb') as f:
    f.write(resp.content)
Sample Output:
example placeholder image api output||placeholder image, code, browser preview#|#Example output of Imageslot API placeholder image with text overlay#|#api-gen-output-sample.jpg
Example output for image generation with text overlay
Pro Tip: Use bg=transparent with filetype=png for images with a transparent background.
  • Generate images instantly for use in any web or app project
  • Supports custom text, colors, font sizes, and styling
  • CDN delivery and high performance

Endpoint Image Resizing

GET https://imageslot.com/v1/{width}x{height}?src={url}

(Upcoming Feature) — Resize an existing image from a public URL to your specified dimensions. All Imageslot query parameters apply.

Name Type Required Description Example
widthintYesTarget width400
heightintYesTarget height250
srcstringYesSource image URL (must be public)https://...
filetypestringNoOutput formatjpg
curl "https://imageslot.com/v1/400x250?src=https://example.com/photo.jpg&filetype=jpg" --output resized.jpg
fetch('https://imageslot.com/v1/400x250?src=https://example.com/photo.jpg&filetype=jpg')
  .then(r => r.blob())
  .then(blob => { /* use blob */ });
import requests
url = 'https://imageslot.com/v1/400x250?src=https://example.com/photo.jpg&filetype=jpg'
resp = requests.get(url)
with open('resized.jpg', 'wb') as f:
    f.write(resp.content)
* Image resizing endpoint is planned for future release. Stay tuned to Features.
Sample output of image resize endpoint in Imageslot API

Endpoint Format Conversion

GET https://imageslot.com/v1/{width}x{height}?filetype={ext}

Instantly convert any generated image to PNG, JPG, JPEG, or GIF by setting the filetype parameter. Useful for adapting images to different workflow or performance needs.

Name Type Required Description Example
filetypestringNoOutput format: png, jpg, jpeg, gifgif
curl "https://imageslot.com/v1/320x100?bg=1A726B&fg=fff&text=Banner&filetype=gif" --output banner.gif
fetch('https://imageslot.com/v1/320x100?bg=1A726B&fg=fff&text=Banner&filetype=gif')
  .then(r => r.blob())
  .then(blob => { /* use blob */ });
import requests
url = 'https://imageslot.com/v1/320x100?bg=1A726B&fg=fff&text=Banner&filetype=gif'
resp = requests.get(url)
with open('banner.gif', 'wb') as f:
    f.write(resp.content)
Sample Output:
api format conversion example output||api endpoint, format conversion, banner, gif#|#Example of Imageslot API format conversion endpoint output#|#api-convert-output-sample.gif
Example output for format conversion endpoint
Pro Tip: PNG supports transparency. JPG/JPEG do not support transparent backgrounds.
  • Instantly convert placeholders to match app requirements
  • Optimize for file size or compatibility
  • All options available via query parameters

Error Codes & Troubleshooting

Meaning: The request is malformed—likely due to missing or invalid parameters (e.g., width or height out of range, bad color value).
How to fix: Double-check your URL and parameter values. Use only supported formats and allowed values. See Parameters for details.

Meaning: API key required or invalid (only if authentication is enabled for advanced usage).
How to fix: Check that you included a valid API key in your request (see FAQ for obtaining an API key). For most public usage, API keys are not required.

Meaning: The requested endpoint or resource does not exist (e.g., typo in path or unsupported endpoint).
How to fix: Check the endpoint URL carefully. See the API endpoints above for valid paths.

Meaning: You have exceeded your request rate limit.
How to fix: Implement client-side caching or exponential backoff. For higher limits, contact support.

Meaning: Something went wrong on the Imageslot server.
How to fix: Try again later. If the issue persists, check your request for errors, or contact support.

  • Missing filetype parameter when required by your app (defaults to PNG if omitted)
  • Invalid hex color values (omit the # symbol, use only 3 or 6 hex digits)
  • Exceeding max image size (above 2000x2000px)
  • URL encoding issues (use + for spaces in text)
  • Trying to set transparency with filetype=jpg (not supported)

Best Practices for Using the Imageslot API

  • Cache placeholder images client-side or via CDN to reduce API calls and speed up page loads
  • Always specify width, height, and filetype for consistent output
  • Use bg=transparent with filetype=png for overlays or design prototyping
  • For retina/high-DPI, double requested size and scale in CSS (e.g., 400x200 for a 200x100 element)
  • Limit text overlays to 64 chars for performance and clarity
  • For accessibility, use high-contrast fg and bg values
  • Batch requests or pre-generate common placeholders for heavy usage scenarios
  • Test output on multiple devices to ensure correct appearance
Making the Complex Simple: Start with a basic URL, then incrementally add parameters as needed. Use our homepage demo tool to experiment visually and copy ready-made URLs.

Imageslot API FAQ

For most basic usage, no API key is required—just construct a URL and use it instantly. If you need higher volume, custom branding, or advanced features, please contact our team for API key provisioning and documentation.

Yes, to ensure fair use and stability, rate limits apply to anonymous and free-tier usage (typically 100 requests/hour/IP). For commercial or high-traffic applications, request a higher limit by contacting support. Exceeding limits will result in a 429 Too Many Requests error.

Supported formats are PNG, JPG, JPEG, and GIF—set with the filetype parameter. PNG is default and supports transparency. JPG/JPEG are best for photographs or when smallest file size is needed. GIF is suitable for basic animated placeholders (single frame).

Check the error code returned (see Error Codes). Double-check all URL parameters for typos, use supported values, and ensure you are not exceeding rate limits. If using an API key, verify it is correct. If issues persist, contact us with your request details.

Yes, Imageslot API is free for personal and commercial projects within fair use. Attribution is appreciated but not required. For bulk, SaaS, or high-traffic usage, request an API key and commercial terms.

For batch processing, stagger your requests to avoid rate limits and utilize client or CDN caching. For bulk or automation workflows, contact us for volume licensing and best-practice workflow advice.