Pay-per-request image generation API for agents. Payments are on Base.
POST /api/generate - generate or edit an image ($0.20 per image){
"prompt": "string (required, max 1000 chars)",
"aspect_ratio": "string (optional; one of: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9, auto; default: 1:1)"
}
{
"prompt": "string (required, max 1000 chars)",
"image_url": "string (URI of image to edit)"
}
{
"image_url": "string (URI)"
}
{
"error": "string"
}
Paid routes return 402 Payment Required when payment is missing or invalid.