GET
/
images
JavaScript
import Weights from '@weights-ai/sdk';

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

const images = await client.images.list();

console.log(images.jobs);
{
  "jobs": [
    {
      "id": "<string>",
      "status": "QUEUED",
      "prompt": "<string>",
      "type": "IMAGE",
      "numImages": 123,
      "dimensions": "SQUARE",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "outputUrls": [
        "<string>"
      ],
      "queuePosition": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

limit
number
default:25

Number of items to return per page

Required range: 1 <= x <= 50
Examples:

25

cursor
string | null

Cursor for pagination to get the next page of results - this is the last item's ID from the previous page

Examples:

"cmcz89fci00zr0dlt68klunpf"

Response

200
application/json

Returns a paginated list of visual creation jobs for the authenticated user.

The response is of type object.