> ## 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.

# Analysis Methods

> Analyze images using different methods

<ResponseField name="classify">
  Classifies an image using a pre-trained model (ResNet50). Returns a list of labels and their probabilities.

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

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

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

<ResponseField name="extractFormattedText">
  Extracts text from an image and returns it in plain text or markdown format.

  <CodeGroup>
    ```typescript node-sdk theme={null}
    extractFormattedText(imageID: string, body: ImageExtractFormattedTextParams | null | undefined = {}, options?: RequestOptions): APIPromise<ImageExtractFormattedTextResponse>;
    ```
  </CodeGroup>

  <Expandable title="extractFormattedTextOptions">
    <ResponseField name="imageID" type="string" required>
      The unique identifier of the image to extract text from.
    </ResponseField>

    <ResponseField name="body" type="object">
      The body parameters for extracting formatted text.

      <Expandable title="ImageExtractFormattedTextParams">
        <ResponseField name="format" type="string">
          The format of the extracted text (markdown or plain). Defaults to plain.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>

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

<ResponseField name="visualize">
  Generates a response based on the content of an image and a text prompt using AI models.

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

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

    <ResponseField name="body" type="object" required>
      The body parameters for visualizing an image.

      <Expandable title="ImageVisualizeParams">
        <ResponseField name="prompt" type="string" required>
          The prompt for the image.
        </ResponseField>

        <ResponseField name="model" type="string">
          The model to use for the visualization (uform-gen, llava, or gemini).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>

  <Expandable title="Examples">
    <CodeGroup>
      ```typescript node-sdk theme={null}
      const response = await client.images.visualize('image_etm0g3x5iap4cld1qcfsjvo2', { prompt: 'What is in this image?' });
      ```
    </CodeGroup>
  </Expandable>
</ResponseField>
