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

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

const image = await client.images.retrieve('id');

console.log(image.id);
{
  "id": "visual_123456789",
  "status": "SUCCEEDED",
  "prompt": "A beautiful sunset over mountains",
  "type": "IMAGE_GENERATION",
  "numImages": 1,
  "dimensions": "SQUARE",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:35:00Z",
  "outputUrls": [
    "https://storage.example.com/images/generated_1.jpg"
  ],
  "lora": null,
  "secondaryLora": null
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Response

200
application/json

Returns the status and results of a visual creation job.

The response is of type object.