POST
/
image-lora-models
/
create
JavaScript
import Weights from '@weights-ai/sdk';

const client = new Weights({
  bearerToken: 'My Bearer Token',
});

const imageLoraModel = await client.imageLoraModels.create({
  images: [
    { url: 'https://example.com/image1.jpg' },
    { url: 'https://example.com/image1.jpg' },
    { url: 'https://example.com/image1.jpg' },
    { url: 'https://example.com/image1.jpg' },
    { url: 'https://example.com/image1.jpg' },
  ],
  name: 'My Custom Style',
});

console.log(imageLoraModel.id);
{
  "id": "<string>",
  "trainingJobId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Returns the ID of the created image LoRA training job.

The response is of type object.