api docs
Generate weird pet images from one endpoint.
Clean JSON in, image URL out. The beta API is designed for bots, mobile apps, meme tools, and pet communities.
Create generation
const res = await fetch("https://petportraitapp.com/api/v1/generate", {
method: "POST",
headers: {
"Authorization": "Bearer pp_live_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
image_url: "https://cdn.example.com/dog.jpg",
style: "pet_final_boss",
aspect_ratio: "1:1",
quality: "standard",
webhook_url: "https://example.com/webhook"
})
})
const generation = await res.json()Completed response
{
"id": "gen_abc123",
"status": "completed",
"style": "pet_final_boss",
"result_url": "https://cdn.petportraitapp.com/results/gen_abc123.png",
"thumbnail_url": "https://cdn.petportraitapp.com/results/gen_abc123_thumb.webp",
"cost_credits": 1
}Error codes
invalid_image_urlunsupported_styleinsufficient_creditsgeneration_failedrate_limitedcontent_policy_blocked