Sample Requests

cURL Example

curl -X POST -H "Content-type: application/json" -d '{"apiKey":"YOUR-API-KEY","url":"openai.com","settings":{"componentFormat":"html","styleFormat":"tailwind"}}' https://api.divmagic.com/v1/magic

JavaScript Example

fetch('https://api.divmagic.com/v1/magic', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'apiKey': 'YOUR_API_KEY',
    'url': 'ft.com',
    'settings': {
      'componentFormat': 'html',
      'styleFormat': 'tailwind'
    }
  })
})
  .then(response => response.json())
  .then(data => console.log(data));

Last updated