REST API v1
Stable

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

Reliability

Stable production-ready API

Battle-tested REST API with predictable response format and high uptime

Infrastructure

Fast global delivery

Optimized image pipeline with low latency and direct CDN-backed URLs for results

Privacy

Data is not used for training

Your images and prompts are never used to train models. Full confidentiality

For business

Invoices and receipts

Payments are processed by Polar.sh as Merchant of Record — proper invoices and receipts included

Authentication

Sign in required

Sign in to obtain an API key and test the endpoints.

Sign up

Bearer Token Authentication

Every API request must include the Authorization header with your API key:

Authorization: Bearer YOUR_API_KEY

Photo processing endpoint

POSThttps://painty.cc/api/v1/photo

Uploads 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

ParameterTypeRequiredDescription
promptstringYesText description of the edits (e.g. "Make the background clean and bright")
imagefileYesImage 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

CodeDescriptionResolution
400Bad RequestCheck that all required parameters are present
401UnauthorizedVerify that the API key is correct
429Too Many RequestsRate limit exceeded — please wait and retry
500Internal Server ErrorServer 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])