Quick Start
Get started with Photo Restoration API in just a few minutes. This guide will walk you through the essential steps to integrate AI-powered photo restoration into your application.
Prerequisites
Before you begin, make sure you have:
- Account: Register at restoreoldphotos.online
- API Key: Create an API key in settings
- Credits: Purchase photo restoration credits
- Image URL: A publicly accessible image URL for testing
Step 1: Get Your API Key
- Visit restoreoldphotos.online
- Sign in with your Google account
- Navigate to Settings > API Keys
- Click "Create New API Key" button
- Enter a key name (e.g., "My App")
- After creating the key, copy the full key value (keep it secure!)
API Key Format
- Starts with
sk-
- Contains randomly generated characters
- Example:
sk-abc123def456ghi789...
Step 2: Make Your First API Call
Using cURL
Using JavaScript
Step 3: Handle the Response
The API returns a JSON response with the restored image:
Or in base64 format:
The output
field contains:
- Image URL: Direct link to the restored image
- Base64 string: Image data encoded as base64
Step 4: Display the Result
In HTML
In JavaScript
Step 5: Error Handling
Always implement proper error handling:
API Key Management
Managing Keys in Settings
- View all API keys list
- View key usage statistics
- Deactivate or delete unused keys
- View last used time for keys
Security Best Practices
- Never hardcode API keys in client-side code
- Store keys using environment variables
- Rotate API keys regularly
- Use different keys for different environments