With Client SDKs you can call custom or public AI model with just one line of code!

Prerequisite

  • Select a model from Model Yard
  • Create an API Key

You can use three ways to call a model on 1019

Client SDK

With Client SDK you need to initialize our SDK in your langauage and then you may able to use custom methods and calls to 1019 backend servers.

Initialize SDK

// 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
})

Run Inference

// 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 out = mp.run("MODEL_NAME:MODEL_VERSION", {
    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(out)

Fine-tune models with your own data

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.

// 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)

Magicpoint CLI

With Magicpoint CLI you can call custom or public AI/ML model with just a command.

magicpoint-cli
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}`

That’s it!

Console

The easiest way! You can call public or custom model via console. Select your model and you can use ▶ Demo tab on the page.