API Reference
Programmatic access to our AI-powered art-to-XML conversion engine. Perfect for developers integrating creative tools into applications.
Base URL
https://elnhnha.com/art2xml/v1/api
Authentication
Use API key in the Authorization
header:
curl -X POST "https://elnhnha.com/art2xml/v1/api/convert" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"artDescription":"Red spiral pattern"}'
Endpoints
/convert
Converts art descriptions to XML output in specified format.
Method
POST
Request Type
JSON
Response Type
XML
Request Body
{
"artDescription": "String describing input art",
"outputFormat": "svg | xaml | custom",
"schemaVersion": "1.0"
}
Response Example
<svg version="1.1" width="400" height="400" ...>
<path d="M100,100 A75,75 0 1,1 150,150" ... />
</svg>
Error Handling
400 Bad Request
Malformed JSON or missing required fields.
401 Unauthorized
Missing or invalid API key.
429 Too Many Requests
API rate limit exceeded.
500 Internal Server Error
Something went wrong. Try again later.