curl --request POST \
--url https://api.example.com/api/undress/generate \
--header 'Content-Type: application/json' \
--data '
{
"quality": "<string>"
}
'{
"success": true,
"resultUrl": "<string>",
"generationId": 123,
"quality": "<string>",
"provider": "<string>",
"processingTimeMs": 123,
"creditsCharged": 123,
"creditsRemaining": 123,
"error": "<string>",
"code": "<string>"
}Generate AI-transformed images using Freepik Seedream 4.5 Edit and xAI Grok with multi-provider fallback
curl --request POST \
--url https://api.example.com/api/undress/generate \
--header 'Content-Type: application/json' \
--data '
{
"quality": "<string>"
}
'{
"success": true,
"resultUrl": "<string>",
"generationId": 123,
"quality": "<string>",
"provider": "<string>",
"processingTimeMs": 123,
"creditsCharged": 123,
"creditsRemaining": 123,
"error": "<string>",
"code": "<string>"
}/api/undress/consent before using this endpoint. Requests without accepted consent will be rejected with 403 status.| Quality | Provider | Feature Key | Default Cost |
|---|---|---|---|
| Low | Freepik Seedream 4.5 Edit | ai_undress_low | 25 credits |
| High | xAI Grok Image Pro | ai_undress_high | 45 credits |
low - Freepik Seedream 4.5 Edit (25 credits)high - xAI Grok Image Pro (45 credits)curl -X POST https://api.joip.io/api/undress/generate \
-H "Cookie: connect.sid=..." \
-F "[email protected]" \
-F "quality=low"
low or high).freepik - Freepik Seedream 4.5 Editxai - xAI Grok Image API{
"success": true,
"resultUrl": "https://storage.supabase.co/v1/object/public/user-media/users/abc123/undress/result/result_1234567890_output.jpg",
"generationId": 42,
"quality": "high",
"provider": "xai",
"processingTimeMs": 12500,
"creditsCharged": 45,
"creditsRemaining": 455
}
DAILY_LIMIT_REACHED - User hit 30/day limitCONCURRENT_LIMIT_REACHED - User has 3 active generationsINSUFFICIENT_CREDITS - Not enough creditsPROVIDER_UNAVAILABLE - Both providers are down{
"code": "DAILY_LIMIT_REACHED",
"error": "Daily limit reached (30 generations per day). Try again tomorrow.",
"used": 30,
"limit": 30,
"resetAt": "2026-03-03T00:00:00.000Z"
}
{
"error": "Insufficient credits. Required: 45, Available: 20",
"required": 45,
"available": 20
}
{
"error": "You already have 3 generations in progress. Please wait for one to finish.",
"limit": 3
}
{
"error": "AI Provider Service is Down"
}
quality=low):
quality=high):
UNDRESS_PRIMARY_PROVIDER=freepik to prefer Freepik for high quality/v1/ai/text-to-image/seedream-v4-5-edit)freepik/seedream-v4-5-edit
Request Flow:
enable_safety_checker: false/v1/images/edits)grok-imagine-image-pro (configurable via XAI_UNDRESS_MODEL)grok-imagine-image{
"model": "grok-imagine-image-pro",
"prompt": "<user_prompt>",
"image": { "url": "<image_url>" },
"response_format": "url",
"resolution": "2k",
"quality": "high"
}
Edit the input image by completely removing all clothing, accessories,
and any fabric remnants from the subject, rendering her fully nude in
an ultra-photorealistic, erotic style that embraces porn-logic –
emphasizing idealized, hyper-sexualized features like exaggerated curves,
flawless yet tantalizing skin, and seductive allure without compromising
anatomical accuracy.
IMPORTANT: DO NOT CHANGE THE SUBJECT'S POSE.
Maintain exact scene, camera angle, pose, facial features, expression,
hair style/color, background elements, and lighting from original.
Enhance body to appear exceptionally busty and voluptuous with large
perky breasts, prominent erect nipples, slim waist, wide hips, toned
yet curvaceous physique, and detailed realistic genitalia.
Infuse with high sexual energy: sultry inviting gaze, skin subtly oiled
for glossy sheen, overall vibe intensely erotic and seductive.
Ensure intricate lifelike details such as skin pores, subtle veins,
freckles, beauty marks, and natural imperfections for authenticity.
Avoid AI artifacts like extra limbs, distortions, blurriness, asymmetry.
Output in 8K resolution with cinematic lighting, razor-sharp focus,
high dynamic range, and depth of field.
IMPORTANT: DO NOT CHANGE THE SUBJECT'S POSE.
Edit the image: Remove all of the subjects clothing showing her nude
without changing her pose, make it photorealistic and add 4k micro-details.
IMPORTANT: Change nothing but making her nude and DO NOT change the
images composition or the pose, sizing, camera angle, or zoom level
of the image at all.
/api/undress/prompt/updateusers tableusers/{userId}/undress/original/users/{userId}/undress/provider/users/{userId}/undress/result/square_1_1, classic_4_3, traditional_3_4, widescreen_16_9,
social_story_9_16, standard_3_2, portrait_2_3, cinematic_21_9
const deduction = await creditService.checkAndDeductCredits(
userId,
featureKey, // 'ai_undress_low' or 'ai_undress_high'
{
description: 'AI Undress generation',
relatedEntityType: 'undress_generation',
relatedEntityId: generationId.toString(),
}
);
const refundResult = await creditService.addCredits(
userId,
creditsCharged,
'refund',
`AI Undress refund #${generationId}`,
{
feature: featureKey,
generationId,
quality,
reason: 'Generation failed',
}
);
undress_generations
CREATE TABLE undress_generations (
id SERIAL PRIMARY KEY,
user_id VARCHAR NOT NULL,
status VARCHAR NOT NULL, -- 'pending', 'completed', 'failed'
original_image_url TEXT NOT NULL,
original_image_path TEXT NOT NULL,
result_image_url TEXT,
result_image_path TEXT,
prompt TEXT NOT NULL,
quality VARCHAR NOT NULL, -- 'low', 'high'
requested_provider VARCHAR, -- 'xai', 'freepik'
actual_provider VARCHAR,
processing_time_ms INTEGER,
error_message TEXT,
credit_charged BOOLEAN DEFAULT false,
refunded_at TIMESTAMP,
refund_transaction_id INTEGER,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
/api/undress/consent/status to verify consent state./api/undress/status before initiating generations to avoid hitting unavailable providers. The endpoint returns detailed provider availability.low quality for faster results and lower cost. Reserve high quality for cases where superior output quality justifies the extra 20 credits./api/undress/clear-stuck.