namastetools/ai-image-upscaler

AI Image Upscaler

Increase image resolution and quality using AI technology. Free, fast, and privacy-friendly image upscaler tool.

Inference
Commercial use
Partner

Table of contents

About

Increase image resolution and quality using AI technology. Free, fast, and privacy-friendly image upscaler tool.

1. Calling the API

Setup your API Key

Set NAMASTE_KEY as an environment variable in your runtime.

export NAMASTE_KEY="YOUR_API_KEY"

Submit a request

Make a POST request to the API endpoint with your file and parameters.

HTTP (cURL)

curl -X POST "https://www.namaste.tools/api/models/ai-image-upscaler" \
  -H "Authorization: Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{\n  "image_url": "https://example.com/image.jpg",\n  "model": "RealESRGAN_x4plus",\n  "scale": 2,\n  "face": false,\n  "tile": 0,\n  "output_format": "png"\n}'

2. Authentication

The API uses an API Key for authentication. Include your API key in the Authorization header of all requests.

API Key

Include your API key in the Authorization header using Bearer token format.

Authorization: Key YOUR_API_KEY

3. Queue

The API uses an asynchronous queue system for processing requests.

Submit a request

Submit your request to the queue and receive a request ID for tracking.

{
  "image_url": "https://example.com/image.jpg",
  "model": "RealESRGAN_x4plus",
  "scale": 2,
  "face": false,
  "tile": 0,
  "output_format": "png"
}

Fetch request status

Check the status of your request using the request ID.

GET /api/models/ai-image-upscaler/requests/{request_id}/status

Get the result

Retrieve the processed result once the request is completed.

GET /api/models/ai-image-upscaler/requests/{request_id}

4. Files

Different ways to provide files to the API.

Hosted files (URL)

Provide URLs to publicly accessible files. The API requires publicly accessible file URIs that can be downloaded without authentication.

{
  "image_url": "https://example.com/image.jpg",
  "model": "RealESRGAN_x4plus",
  "scale": 2,
  "face": false,
  "tile": 0,
  "output_format": "png"
}

Uploading files

Upload your files to any cloud storage provider (AWS S3, Google Cloud Storage, Azure Blob, etc.) and then use the public URL in your API request. The API accepts publicly accessible URLs only.

Step 1: Upload to Cloud Storage

Upload your image to any cloud provider and get a publicly accessible URL.

Supported cloud providers: AWS S3, Google Cloud Storage, Azure Blob Storage, Cloudinary, Imgur, or any service that provides publicly accessible URLs.

Step 2: Use the URL in API Request

{
  "image_url": "https://example.com/image.jpg",
  "model": "RealESRGAN_x4plus",
  "scale": 2,
  "face": false,
  "tile": 0,
  "output_format": "png"
}

5. Schema

Input

The API accepts the following input parameters:

image_urlstringrequired
URL of the image file to upscale
Format: uri
model"RealESRGAN_x4plus" | "RealESRGAN_x2plus" | "RealESRGAN_x4plus_anime_6B" | "RealESRGAN_x4_v3" | "RealESRGAN_x4_wdn_v3" | "RealESRGAN_x4_anime_v3"
AI model optimized for different image types
Default: "RealESRGAN_x4plus"Options: RealESRGAN_x4plus, RealESRGAN_x2plus, RealESRGAN_x4plus_anime_6B, RealESRGAN_x4_v3, RealESRGAN_x4_wdn_v3, RealESRGAN_x4_anime_v3
scalenumber
Rescaling factor (1x to 8x enlargement)
Default: 2Min: 1Max: 8
faceboolean
Enable specialized processing for face/portrait images
Default:
tilenumber
Tile size for GPU memory management (0 = auto, 400+ for large images)
Default: 0Min: 0Max: 800
output_format"png" | "jpeg"
Output image format
Default: "png"Options: png, jpeg

Output

The API returns the following output format:

imageobjectrequired
Processed image result

Additional Information

Additional information about the API.

Supported Formats

.png, .jpg, .jpeg

API Limits

Processing timeout:30 seconds
Rate limit:100 requests/minute
Concurrent requests:5 per account

Error Responses

400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
402Payment Required - Insufficient credits
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Ready to get started?

Start using our API to integrate AI Image Upscaler into your applications today.