PrinceMarketing.aiPrinceMarketing.ai

Quickstart

First API call in 4 seconds. Get an API key, send a request, receive quality-scored creative.

1Get your API key

Sign up at princemarketing.ai/register. You will receive a key prefixed pk_live_ (production) or pk_test_ (sandbox). 100 free credits included.

2Make your first request

curl
curl -X POST https://api.princemarketing.ai/v1/generate/image \
  -H "Authorization: Bearer pk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Premium headphones on matte black surface",
    "style": "photorealistic",
    "qualityTier": "pro"
  }'
JavaScript
const response = await fetch('https://api.princemarketing.ai/v1/generate/image', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer pk_live_YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'Premium headphones on matte black surface',
    style: 'photorealistic',
    qualityTier: 'pro',
  }),
});

const { data, meta } = await response.json();
console.log(data.imageUrl);      // Generated image URL
console.log(data.score.aggregate); // Quality score (e.g., 8.7)
console.log(meta.creditsConsumed); // Credits used (5)
Python
import requests

response = requests.post(
    'https://api.princemarketing.ai/v1/generate/image',
    headers={
        'Authorization': 'Bearer pk_live_YOUR_KEY',
        'Content-Type': 'application/json',
    },
    json={
        'prompt': 'Premium headphones on matte black surface',
        'style': 'photorealistic',
        'qualityTier': 'pro',
    },
)

data = response.json()
print(data['data']['imageUrl'])        # Generated image URL
print(data['data']['score']['aggregate'])  # Quality score
print(data['meta']['creditsConsumed'])     # Credits used

3Receive quality-scored output

Every response includes the generated asset and a full quality score across 12 dimensions. If the score is below your quality tier threshold, the system auto-regenerates.

Response
{
  "type": "success",
  "data": {
    "imageUrl": "https://cdn.princemarketing.ai/gen/img_abc123.png",
    "refinedPrompt": "Premium over-ear headphones positioned on a matte black...",
    "score": {
      "aggregate": 8.7,
      "passed": true,
      "dimensions": [
        { "dimension": "clarity", "score": 9.0, "reasoning": "..." },
        { "dimension": "composition", "score": 8.5, "reasoning": "..." },
        ...
      ],
      "feedback": "Strong product shot with excellent technical quality."
    }
  },
  "meta": {
    "generationId": "gen_abc123",
    "creditsConsumed": 5,
    "duration_ms": 3420
  }
}

What to do next