AI Girl Generator API documentation
Generate an AI portrait image from a text prompt.
Endpoints
| Contract item | Value |
|---|---|
| Capability | ai-girl-generator |
| Submit | POST https://vidmage.ai/api/v1/ai-girl-generator/submit |
| Query | POST https://vidmage.ai/api/v1/ai-girl-generator/query |
| Task identifier | taskId |
| Result field | imageUrl |
Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.
Product guide: AI Girl Generator API for Portrait Briefs
Parameters and input rules
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text description of the portrait to generate. |
aspectRatio | string | No | "9:16" | Preferred output aspect ratio. Exact pixel dimensions are chosen by the provider. Values: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9" |
width | string | No | "1080" | Legacy width hint used with height to infer aspect ratio when aspectRatio is omitted. It does not guarantee exact output pixels. |
height | string | No | "1920" | Legacy height hint used with width to infer aspect ratio when aspectRatio is omitted. It does not guarantee exact output pixels. |
Example request
{
"prompt": "A confident young woman in a sunlit botanical garden, natural expression, editorial portrait photography",
"aspectRatio": "9:16",
"width": "1080",
"height": "1920"
}# 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-girl-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A confident young woman in a sunlit botanical garden, natural expression, editorial portrait photography","aspectRatio":"9:16","width":"1080","height":"1920"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Task results and recovery
URL of the generated image. Read imageUrl from the completed query response. Preserve taskId while the task is running.
curl -X POST "https://vidmage.ai/api/v1/ai-girl-generator/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }Submission and task queries report the available task and usage information. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.
For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.
Credits
| Component / option | Rate | Minimum |
|---|---|---|
| Per request | 5 credits / image | — |
A fixed credit charge applies to this API request.
Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.
