Image Denoise API
Remove noise, grain, and artifacts from images programmatically with a single API call. AI-powered denoising that preserves sharp details and textures.
Why Use This API
AI Noise Reduction
Advanced deep learning removes ISO grain, sensor noise, and digital artifacts while keeping edges crisp and details intact.
Low-Light Cleanup
Rescue noisy photos taken in low-light conditions. Perfect for night photography, indoor shots, and surveillance footage.
Grain Removal
Remove film grain from scanned analog photos and video frames. Supports adjustable strength for fine control.
Artifact Removal
Clean up JPEG compression artifacts, banding, and color noise. Restore images to their intended clarity.
Quick Start
Start denoising images in under a minute. Here's how:
- Get your API key — Sign up free to receive your key
- Send a request — POST an image to the endpoint with your desired strength
- Get the result — Receive a clean, denoised image in the response
curl -X POST https://precisioncounter.com/api/v1/denoise-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@noisy_photo.jpg" \
-F "strength=medium" \
-o denoised.png
import requests
response = requests.post(
"https://precisioncounter.com/api/v1/denoise-image",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"image": open("noisy_photo.jpg", "rb")},
data={"strength": "medium"}
)
with open("denoised.png", "wb") as f:
f.write(response.content)
const fs = require("fs");
const FormData = require("form-data");
const form = new FormData();
form.append("image", fs.createReadStream("noisy_photo.jpg"));
form.append("strength", "medium");
const response = await fetch(
"https://precisioncounter.com/api/v1/denoise-image",
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
...form.getHeaders()
},
body: form
}
);
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("denoised.png", buffer);
API Reference
Base URL
https://precisioncounter.com/api/v1
Authentication
All requests require an API key passed in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Denoise Image
Removes noise, grain, and artifacts from an uploaded image using AI and returns the cleaned result.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| image required | file | The image file to denoise. Accepted formats: PNG, JPG, JPEG, WebP. Max size: 10 MB. |
| strength optional | string | Denoising strength. Default: medium. Options: light, medium, strong. |
| preserve_detail optional | boolean | Prioritize detail preservation. Default: true. Set to false for maximum noise removal. |
Response
200 OK — Returns the denoised image as binary data with Content-Type: image/png.
Response Headers
| Header | Value |
|---|---|
| Content-Type | image/png or image/webp |
| X-Credits-Remaining | Number of API credits remaining |
| X-Processing-Time | Processing time in milliseconds |
Code Examples
Full Examples with Error Handling
import requests
import sys
API_KEY = "YOUR_API_KEY"
API_URL = "https://precisioncounter.com/api/v1/denoise-image"
def denoise_image(input_path, output_path="denoised.png", strength="medium"):
"""Remove noise from an image file."""
with open(input_path, "rb") as img:
response = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
files={"image": img},
data={"strength": strength, "preserve_detail": "true"}
)
if response.status_code == 200:
with open(output_path, "wb") as f:
f.write(response.content)
print(f"Saved to {output_path}")
print(f"Credits remaining: {response.headers.get('X-Credits-Remaining')}")
else:
print(f"Error {response.status_code}: {response.json()['error']}")
denoise_image("noisy_photo.jpg", strength="strong")
const fs = require("fs");
const FormData = require("form-data");
const fetch = require("node-fetch");
const API_KEY = "YOUR_API_KEY";
const API_URL = "https://precisioncounter.com/api/v1/denoise-image";
async function denoiseImage(inputPath, outputPath = "denoised.png", strength = "medium") {
const form = new FormData();
form.append("image", fs.createReadStream(inputPath));
form.append("strength", strength);
form.append("preserve_detail", "true");
const response = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
...form.getHeaders()
},
body: form
});
if (response.ok) {
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync(outputPath, buffer);
console.log(`Saved to ${outputPath}`);
console.log(`Credits: ${response.headers.get("x-credits-remaining")}`);
} else {
const error = await response.json();
console.error(`Error ${response.status}: ${error.error}`);
}
}
denoiseImage("noisy_photo.jpg", "denoised.png", "strong");
<?php
$api_key = "YOUR_API_KEY";
$url = "https://precisioncounter.com/api/v1/denoise-image";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_key"
],
CURLOPT_POSTFIELDS => [
"image" => new CURLFile("noisy_photo.jpg"),
"strength" => "medium",
"preserve_detail" => "true"
]
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
file_put_contents("denoised.png", $response);
echo "Image denoised successfully\n";
} else {
echo "Error $httpCode: $response\n";
}
?>
package main
import (
"bytes"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
func denoiseImage(inputPath, outputPath, strength string) error {
file, _ := os.Open(inputPath)
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("image", inputPath)
io.Copy(part, file)
writer.WriteField("strength", strength)
writer.WriteField("preserve_detail", "true")
writer.Close()
req, _ := http.NewRequest("POST",
"https://precisioncounter.com/api/v1/denoise-image", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", writer.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode == 200 {
out, _ := os.Create(outputPath)
defer out.Close()
io.Copy(out, resp.Body)
fmt.Printf("Saved to %s\n", outputPath)
}
return nil
}
func main() {
denoiseImage("noisy_photo.jpg", "denoised.png", "medium")
}
require "net/http"
require "uri"
api_key = "YOUR_API_KEY"
uri = URI("https://precisioncounter.com/api/v1/denoise-image")
form_data = [
["image", File.open("noisy_photo.jpg", "rb")],
["strength", "medium"],
["preserve_detail", "true"]
]
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{api_key}"
req.set_form(form_data, "multipart/form-data")
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
if res.code == "200"
File.binwrite("denoised.png", res.body)
puts "Image denoised successfully"
else
puts "Error #{res.code}: #{res.body}"
end
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
using var form = new MultipartFormDataContent();
var imageContent = new ByteArrayContent(File.ReadAllBytes("noisy_photo.jpg"));
imageContent.Headers.ContentType = new("image/jpeg");
form.Add(imageContent, "image", "noisy_photo.jpg");
form.Add(new StringContent("medium"), "strength");
form.Add(new StringContent("true"), "preserve_detail");
var response = await client.PostAsync(
"https://precisioncounter.com/api/v1/denoise-image", form);
if (response.IsSuccessStatusCode)
{
var result = await response.Content.ReadAsByteArrayAsync();
File.WriteAllBytes("denoised.png", result);
Console.WriteLine("Image denoised successfully");
}
Error Handling
The API returns standard HTTP status codes with JSON error bodies:
| Status | Meaning | Description |
|---|---|---|
| 200 | Success | Image denoised successfully. Response body is the output image. |
| 400 | Bad Request | Missing image file, unsupported format, invalid strength, or file too large. |
| 401 | Unauthorized | Missing or invalid API key. |
| 429 | Rate Limited | Too many requests. Wait and retry with exponential backoff. |
| 500 | Server Error | Internal processing error. Retry the request. |
Error Response Format
{
"error": "Invalid strength value. Accepted: light, medium, strong",
"code": "INVALID_PARAMETER",
"status": 400
}
Rate Limits
| Plan | Requests / Minute | Max File Size | Max Resolution |
|---|---|---|---|
| Free | 10 | 10 MB | 4096 x 4096 px |
| Pro | 60 | 25 MB | 8192 x 8192 px |
Rate limit headers are included in every response:
X-RateLimit-Limit: 10 X-RateLimit-Remaining: 7 X-RateLimit-Reset: 1708646400
Use Cases
- Night photography cleanup
- Surveillance footage enhancement
- Medical imaging noise reduction
- Scanned document cleanup
- Astrophotography processing
- Smartphone photo improvement
Pricing
Get free API credits when you sign up. No credit card required.
Frequently Asked Questions
preserve_detail parameter set to true for maximum detail retention, especially useful for textures, text, and fine patterns.light (subtle cleanup for minor noise), medium (balanced noise reduction for most photos), and strong (aggressive denoising for very noisy images like night photos or high-ISO shots).