// Please make sure that you run 'npm install magicpoint@latest'import Magicpoint from 'magicpoint';const mp = Magicpoint.init({ API_KEY: process.env.MP_API_KEY})
You can improve open-source models with your own data to create new models that are better suited to specific tasks.
Image models like SDXL can generate images of a particular person, object, or style.
Copy
// Please make sure that you run 'npm install magicpoint@latest'import Magicpoint from 'magicpoint';const mp = Magicpoint.init({ API_KEY: process.env.MP_API_KEY})const training = mp.training.create("sdxl-training:13853038482995843", { input: { "input_images": "https://example.url/pictures.zip }, destination: "eftal/sdxl-finetuned-with-pictures"})console.log(training)// When Traning completed you can call your custom inference api const output = mp.run("eftal/sdxl-finetuned-with-pictures", { input: { width: 512, height: 512, prompt: "a spaceship into the ocean, dramatic lights, hd", scheduler: "K_EULER", num_outputs: 1, guidance_scale: 7.5, num_inference_steps: 50 },})console.log(output)
With Magicpoint CLI you can call custom or public AI/ML model with just a command.
magicpoint-cli
Copy
magicpoint run modelId:modelVersion -input `{"width": 512,"height": 512,"prompt": "a spaceship into the ocean, dramatic lights, hd","scheduler": "K_EULER","num_outputs:" 1,"guidance_scale": 7.5,"num_inference_steps": 50}`