Photo Restoration API
Restore old photos using AI technology
The Photo Restoration API allows you to restore old, damaged photos using advanced AI technology. This endpoint processes images and returns a restored version. Experience the powerful AI photo restoration feature of Restore Old Photos.
Endpoint
Authentication
Requires a valid API key in the Authorization header:
Request
Headers
Header | Required | Description |
---|---|---|
Content-Type | Yes | Must be application/json |
Authorization | Yes | Your API key in format Bearer YOUR_API_KEY |
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
imageUrl | string | Yes | URL of the image to restore (must be publicly accessible) |
Request Example
Response
Success Response (200)
API returns the URL or base64 string of the restored image. The platform automatically handles all stream types, and the output
field is always a URL or base64 string.
or:
Description:
- Output is the URL of the image (recommended) or base64 string (for partial images/large files)
- No stream object is returned, users can directly use it for img tags or download
Error Responses
400 Bad Request
401 Unauthorized
402 Payment Required
500 Internal Server Error
429 Too Many Requests
Rate Limits
- Limit: 100 requests per hour per API key
- Window: 60 minutes
- Response: 429 Too Many Requests when exceeded
Usage Examples
JavaScript/Node.js
cURL
Image Requirements
- Format: JPG, PNG, WebP
- Size: Maximum 5MB
- Accessibility: Image URL must be publicly accessible
- Content: Must be a valid image file
Processing Time
- Typical: 10-30 seconds
- Large images: May take up to 60 seconds
Credits
- Cost: 1 credit per restoration
- Deduction: Credits are deducted upon successful processing
Best Practices
- Image Quality: Use high-quality images for better results
- Error Handling: Always implement proper error handling
- Credit Management: Monitor your credit balance regularly
- Output Handling: Output is always a string, no stream processing needed
Troubleshooting
Common Issues
401 Unauthorized
- Check that your API key is correct
- Ensure the API key is active and not expired
402 Payment Required
- Add credits to your account
- Check your current credit balance
400 Bad Request
- Verify the imageUrl is a valid, accessible URL
- Ensure the image format is supported
Invalid Output Format
- Output should always be a string (URL or base64)
- Check if the API response contains the expected output field
429 Too Many Requests
- You have exceeded the rate limit of 100 requests per hour
- Wait for the rate limit window to reset before making more requests
Support
If you encounter issues not covered here, please contact our support team.