Send a POST request to our endpoint with your text and styling preferences.
fetch('https://api.writeai.com/v1/handwriting', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
text: 'Hello, this is my handwriting!',
style: 'casual',
format: 'png' // or 'pdf', 'svg'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));