API Documentation
Professional REST API for AI photo processing. Upload images, provide a prompt — get direct links to results.
Why choose us
Reliability, security, and a professional approach
Stable production-ready API
Battle-tested REST API with predictable response format and high uptime
Fast global delivery
Optimized image pipeline with low latency and direct CDN-backed URLs for results
Data is not used for training
Your images and prompts are never used to train models. Full confidentiality
Invoices and receipts
Payments are processed by Polar.sh as Merchant of Record — proper invoices and receipts included
Authentication
Bearer Token Authentication
Every API request must include the Authorization header with your API key:
Authorization: Bearer YOUR_API_KEYPhoto processing endpoint
https://painty.cc/api/v1/photoUploads an image and a text prompt, processes it through the AI model, and returns direct links to the results.
Request parameters
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of the edits (e.g. "Make the background clean and bright") |
image | file | Yes | Image file (formats: jpg, png, webp; max size: 10MB) |
Successful response
Status: 200 OK
{
"status": "ok",
"data": {
"jobId": 123,
"originalUrl": "https://s3.twcstorage.ru/.../original.jpg",
"resultUrls": [
"https://s3.twcstorage.ru/.../result.jpg"
]
}
}Error codes
| Code | Description | Resolution |
|---|---|---|
400 | Bad Request | Check that all required parameters are present |
401 | Unauthorized | Verify that the API key is correct |
429 | Too Many Requests | Rate limit exceeded — please wait and retry |
500 | Internal Server Error | Server error — retry the request later |
Limits
File size
Maximum upload size: 10 MB
Formats
Supported formats: JPG, PNG, WebP, GIF
Timeout
Maximum processing time: 240 seconds
Storage
Processed results are retained for: 24 hours
Code examples
cURL
curl -X POST 'https://painty.cc/api/v1/photo' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F "prompt=Make the background clean and bright" \
-F "image=@/path/to/photo.jpg"JavaScript (fetch)
const formData = new FormData();
formData.append('prompt', 'Make the background clean and bright');
formData.append('image', fileInput.files[0]);
const response = await fetch('https://painty.cc/api/v1/photo', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
body: formData,
});
const data = await response.json();
console.log('Result:', data.data.resultUrls[0]);Python (requests)
import requests
url = "https://painty.cc/api/v1/photo"
headers = {"Authorization": f"Bearer YOUR_API_KEY"}
files = {"image": open("photo.jpg", "rb")}
data = {"prompt": "Make the background clean and bright"}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(result["data"]["resultUrls"][0])