🎨 Art2XML API

About the API

The Art2XML API is designed for developers who want to integrate hand-drawn artwork conversion directly into their applications. Convert sketches into structured XML data for SVG, UI elements, and animations with simple JSON-based endpoints.

🌍 Base URL

https://api.el-nhnha.com/art2xml/v1

🔐 Authentication

API access requires an API_KEY which can be obtained through our contact page. Include it in the headers with every request:

Authorization: Bearer API_KEY

⚡ Endpoints

1. Convert Art to XML

POST /art/convert

{
  "artwork": "[Base64 encoded image or SVG string]",
  "format": "svg | xml | json",
  "resolution": "high | medium | low"
}

2. Get Conversion Status

GET /art/status?request_id=UNIQUE_ID

3. Download Result

GET /art/download?output_id=RESULT_ID

💻 Example Usage

Node.js Example


const fetch = require('node-fetch');
fetch('https://api.el-nhnha.com/art2xml/v1/art/convert', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        artwork: 'base64_or_svg_data',
        format: 'svg',
        resolution: 'high'
    })
})
.then(response => response.json())
.then(data => console.log(data));

                

Python Example


import requests
response = requests.post(
    'https://api.el-nhnha.com/art2xml/v1/art/convert',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'artwork': 'base64_or_svg_data',
        'format': 'svg',
        'resolution': 'high'
    }
)
print(response.json())

                

⚠️ Rate Limits