Skip to main content
POST
/
api
/
babecock
/
generate
Generate babecock
curl --request POST \
  --url https://api.example.com/api/babecock/generate \
  --header 'Content-Type: application/json' \
  --data '
{
  "babeImageUrl": "<string>",
  "cockImageUrl": "<string>",
  "layout": "<string>",
  "saveToVault": true
}
'
{
  "success": true,
  "imageUrl": "<string>",
  "layout": "<string>",
  "dimensions": {
    "width": 123,
    "height": 123
  },
  "mediaId": 123
}
Generates a babecock (split-screen combination) by pairing a “babe” image with a “cock” image. The server automatically determines the optimal layout (side-by-side or top-bottom) based on aspect ratios.

Request

babeImageUrl
string
required
URL or data URI of the babe image
cockImageUrl
string
required
URL or data URI of the cock image
layout
string
default:"auto"
Layout mode: auto, side-by-side, top-bottom
saveToVault
boolean
default:"false"
Whether to save the result to Media Vault

Response

success
boolean
required
Whether generation succeeded
imageUrl
string
required
URL of the generated babecock image
layout
string
required
Layout used: side-by-side or top-bottom
dimensions
object
required
Generated image dimensions
mediaId
integer
Media vault ID (only if saveToVault=true)

Example Request

curl -X POST https://your-domain.com/api/babecock/generate \
  -H "Content-Type: application/json" \
  -H "Cookie: connect.sid=your-session-cookie" \
  -d '{
    "babeImageUrl": "https://example.com/babe.jpg",
    "cockImageUrl": "https://example.com/cock.jpg",
    "layout": "auto",
    "saveToVault": true
  }'

Example Response

{
  "success": true,
  "imageUrl": "https://storage.supabase.co/object/public/general/babecock-abc123.jpg",
  "layout": "side-by-side",
  "dimensions": {
    "width": 1920,
    "height": 1080
  },
  "mediaId": 456
}

Response Codes

CodeDescription
200Success - Babecock generated
400Bad Request - Invalid image URLs or format
401Unauthorized - User not authenticated
402Payment Required - Insufficient credits
413Payload Too Large - Image exceeds size limit
500Server error during processing

Layout Detection

When layout="auto", the server analyzes aspect ratios:
  • Side-by-side: Used when images are portrait or square
  • Top-bottom: Used when images are landscape
Manual layout selection overrides automatic detection.

Image Requirements

  • Formats: JPEG, PNG, WebP
  • Max size: 20MB per image
  • Min dimensions: 200x200 pixels
  • Max dimensions: 4000x4000 pixels

Notes

  • Generation typically takes 2-5 seconds
  • Images are automatically resized to match heights/widths
  • Results are stored temporarily; use saveToVault for permanent storage
  • Temporary results expire after 24 hours

Build docs developers (and LLMs) love