🔍 PromptLens API

Generate optimized AI prompts from images programmatically

💼 Business Tier Required

API access requires a Business subscription ($99/mo)

Free: 50 calls/month
Pro: 1,000 calls/month
Enterprise: Custom limits

🚀 Quick Start

Get your API key from your dashboard, then make your first request:

curl -X POST https://promptlens.polsia.app/api/v1/analyze \
  -H "Authorization: Bearer pl_your_api_key_here" \
  -F "image=@photo.jpg" \
  -F "model=midjourney"
import requests

api_key = "pl_your_api_key_here"
url = "https://promptlens.polsia.app/api/v1/analyze"

with open("photo.jpg", "rb") as f:
    files = {"image": f}
    data = {"model": "midjourney"}
    headers = {"Authorization": f"Bearer {api_key}"}

    response = requests.post(url, files=files, data=data, headers=headers)
    result = response.json()

    print(result["prompts"]["midjourney"]["premium"]["text"])
const fs = require('fs');
const FormData = require('form-data');
const fetch = require('node-fetch');

const apiKey = 'pl_your_api_key_here';
const url = 'https://promptlens.polsia.app/api/v1/analyze';

const form = new FormData();
form.append('image', fs.createReadStream('photo.jpg'));
form.append('model', 'midjourney');

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`
  },
  body: form
});

const result = await response.json();
console.log(result.prompts.midjourney.premium.text);

📊 Response Format

{
  "success": true,
  "image_id": 12345,
  "prompts": {
    "midjourney": {
      "basic": {
        "text": "A serene mountain landscape...",
        "scores": { "quality": 85, "relevance": 80, "engagement": 75 }
      },
      "premium": {
        "text": "A breathtaking mountain landscape featuring...",
        "scores": { "quality": 92, "relevance": 90, "engagement": 88 }
      },
      "detailed": {
        "text": "Epic mountain landscape photography, snow-capped peaks...",
        "scores": { "quality": 96, "relevance": 94, "engagement": 92 }
      }
    }
  },
  "metadata": {
    "filename": "mountain.jpg",
    "size_bytes": 2458392,
    "dimensions": { "width": 1920, "height": 1080 }
  }
}

📖 API Reference

Ready to get started?

Upgrade to Business tier and generate your first API key

View Pricing →