AI Hairstyle Changer
POST /api/v1/ai-hairstyle-changer/submit
imageUrl is required and hairstylePrompt is required.
Required inputs
imageUrlstring- URL of the source portrait image.
hairstylePromptstring- Text description of the desired hairstyle.
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/ai-hairstyle-changer/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"imageUrl":"https://vidmage.ai/assets/images/samples/blue-eyed-woman-sunlight.webp","hairstylePrompt":"Replace the current hairstyle with shoulder-length soft waves and natural curtain bangs"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules2 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
imageUrl | string | Yes | Not specified | URL of the source portrait image. No additional field constraint listed. |
hairstylePrompt | string | Yes | Not specified | Text description of the desired hairstyle. No additional field constraint listed. |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/ai-hairstyle-changer/query
Use the same Bearer API key. On completion, read the imageUrl result field.
curl -X POST "https://vidmage.ai/api/v1/ai-hairstyle-changer/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }
