Edit and generate images programmatically.
All requests require a Bearer token in the Authorization header.
Authorization: Bearer xmorf_your_token_here
Contact us to get an API token, or generate one from the admin panel.
https://xmorf.com/api/v1
/api/v1/editTransform an image using a natural language prompt.
| Field | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Base64-encoded image (data URL or raw base64) |
| prompt | string | Yes | Editing instruction in plain English |
| model | string | No | Model to use (default: standard) |
| referenceImage | string | No | Base64 reference image (for shadow/kiss models) |
| standard | General-purpose AI image editing |
| enhance | Enhance realism / anything-to-real |
| upscale | Upscale and improve resolution |
| shadow | Light & shadow migration (needs referenceImage) |
| kiss | Passionate kiss effect (needs referenceImage) |
| skin | Skin editing and retouching |
| angles | Multi-angle view generation |
| scene | Scene change / next-scene generation |
curl -X POST https://xmorf.com/api/v1/edit \
-H "Authorization: Bearer xmorf_your_token" \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/png;base64,iVBOR...",
"prompt": "Remove the background",
"model": "standard"
}'{
"image": "data:image/png;base64,iVBOR..."
}/api/v1/generateGenerate an image from a text prompt.
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text description of the image to generate |
| model | string | No | OpenAI model (default: dall-e-2) |
| size | string | No | Image size, e.g. 1024x1024 (default: 1024x1024) |
curl -X POST https://xmorf.com/api/v1/generate \
-H "Authorization: Bearer xmorf_your_token" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic city at sunset, cyberpunk style"
}'{
"image": "data:image/png;base64,iVBOR..."
}/api/v1/editReturns the list of available edit models.
curl https://xmorf.com/api/v1/edit \ -H "Authorization: Bearer xmorf_your_token"
All errors return JSON with an error field.
| Status | Meaning |
|---|---|
| 400 | Bad request — missing required fields |
| 401 | Unauthorized — invalid or missing token |
| 429 | Rate limited — edit limit reached |
| 500 | Server error — check error message |
API tokens with admin role have no edit limits. Processing time is up to 120 seconds for edits and 60 seconds for generation.