xmorf API

Edit and generate images programmatically.

Authentication

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.

Base URL

https://xmorf.com/api/v1

Edit an Image

POST/api/v1/edit

Transform an image using a natural language prompt.

Request Body

FieldTypeRequiredDescription
imagestringYesBase64-encoded image (data URL or raw base64)
promptstringYesEditing instruction in plain English
modelstringNoModel to use (default: standard)
referenceImagestringNoBase64 reference image (for shadow/kiss models)

Available Models

standardGeneral-purpose AI image editing
enhanceEnhance realism / anything-to-real
upscaleUpscale and improve resolution
shadowLight & shadow migration (needs referenceImage)
kissPassionate kiss effect (needs referenceImage)
skinSkin editing and retouching
anglesMulti-angle view generation
sceneScene change / next-scene generation

Example

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"
  }'

Response

{
  "image": "data:image/png;base64,iVBOR..."
}

Generate an Image

POST/api/v1/generate

Generate an image from a text prompt.

Request Body

FieldTypeRequiredDescription
promptstringYesText description of the image to generate
modelstringNoOpenAI model (default: dall-e-2)
sizestringNoImage size, e.g. 1024x1024 (default: 1024x1024)

Example

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"
  }'

Response

{
  "image": "data:image/png;base64,iVBOR..."
}

List Models

GET/api/v1/edit

Returns the list of available edit models.

curl https://xmorf.com/api/v1/edit \
  -H "Authorization: Bearer xmorf_your_token"

Errors

All errors return JSON with an error field.

StatusMeaning
400Bad request — missing required fields
401Unauthorized — invalid or missing token
429Rate limited — edit limit reached
500Server error — check error message

Rate Limits

API tokens with admin role have no edit limits. Processing time is up to 120 seconds for edits and 60 seconds for generation.