> ## Documentation Index
> Fetch the complete documentation index at: https://docs.img-processing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Access Methods

> Get images, make them public, or private.

<ResponseField name="retrieve">
  Retrieves a specific image information to get information about the image, such as the image URL, the image size, or the image format.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    retrieve(imageID: string, options?: RequestOptions): APIPromise<ImageObject>;
    ```
  </CodeGroup>

  <Expandable title="retrieveOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to retrieve.
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const imageObject = await client.images.retrieve('image_etm0g3x5iap4cld1qcfsjvo2');
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>

<ResponseField name="list">
  Retrieves a list of all the images created by the user. The images are returned in descending order of creation date, with the most recent images first in the list.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    list(query: ImageListParams | null | undefined = {}, options?: RequestOptions): APIPromise<ImageListResponse>;
    ```
  </CodeGroup>

  <Expandable title="listOptions">
    <ResponseField name="query" type="object">
      The query parameters for listing images.

      <Expandable title="ImageListParams">
        <ResponseField name="from" type="string">
          The image ID to start from when listing images.
        </ResponseField>

        <ResponseField name="take" type="number">
          The number of images to return.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const images = await client.images.list();
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>

<ResponseField name="delete">
  Deletes an image by its unique identifier, deleting all the data associated with the image, and making it unavailable for future requests.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    delete(imageID: string, options?: RequestOptions): APIPromise<void>;
    ```
  </CodeGroup>

  <Expandable title="deleteOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to delete.
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      await client.images.delete('image_etm0g3x5iap4cld1qcfsjvo2');
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>

<ResponseField name="publish">
  Makes a private image public, so that it can be accessed by anyone. Publishing an image adds it to a CDN, allowing it to be accessed faster and more efficiently.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    publish(imageID: string, options?: RequestOptions): APIPromise<ImageObject>;
    ```
  </CodeGroup>

  <Expandable title="publishOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to publish.
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const imageObject = await client.images.publish('image_etm0g3x5iap4cld1qcfsjvo2');
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>

<ResponseField name="unpublish">
  Unpublishes an image that was previously published using the Publish Image endpoint. This will remove the image from the CDN and make it private again.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    unpublish(imageID: string, options?: RequestOptions): APIPromise<ImageObject>;
    ```
  </CodeGroup>

  <Expandable title="unpublishOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to unpublish.
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const imageObject = await client.images.unpublish('image_etm0g3x5iap4cld1qcfsjvo2');
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>

<ResponseField name="download">
  Downloads an image by its unique identifier. The image is returned as a binary response.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    download(imageID: string, options?: RequestOptions): APIPromise<Response>;
    ```
  </CodeGroup>

  <Expandable title="downloadOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to download.
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const response = await client.images.download('image_etm0g3x5iap4cld1qcfsjvo2');
      const content = await response.blob();
      console.log(content);
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>
