How to Generate Markdown for Images

Make a POST request to the /v2/markdown-converter/ endpoint with the required parameters in the body and make sure you use the image type.

To use the image type, the resource should be provided as URLs.

Request Example (File Path)

from wetro import Wetrocloud
    
# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")
    
# Generate Markdown
markdown_response = client.markdown_converter(
  link = "./image/zy69smzbjqtogtjlszki.jpg", # Replace with your actual file path
  resource_type = "image"
)

print(markdown_response)

Request Example (File as URL)

from wetro import Wetrocloud
    
# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")
    
# Generate Markdown
markdown_response = client.markdown_converter(
  link = "https://res.cloudinary.com/dxcb59rb3/image/upload/v1747912102/zy69smzbjqtogtjlszki.jpg",
  resource_type = "image"
)

print(markdown_response)

Successful Response

A successful response confirms the operation and tracks token usage.

Example Response

{
      response: 'Certainly! Here is the extracted information from the image:\n\n---\n\n
      ### Summary of the Month (28/04/2025)
      \n\n- Activities carried out:
      \n  - Automation of the loan allocation process
      \n  - Business process automation of the compassionate loan process
      \n  - Attendance/representation at the SPE FORUM
      \n  - Field and office business process automation
      \n  - Car and compassionate loan demos
      \n  - Development of the car/compassionate loan team calculator tool
      \n\n- Challenges and solutions:
      \n  - Technical problems involved in building the application.
      \n\n- Additional notes:\n  - Automatic formatting (related to figures/calculations).
      \n\n- Calculations:\n  - \\( 8,000,000 \\times 4 = 12 \\,(10,000) \\)
      \n  - \\( 3,400,000 - 120,000 \\)\n  - \\( 3,200,000 - 120,000 \\)
      \n\n- Amounts mentioned:\n  - 4,000,000\n  - 10,000\n  - 120,000',
      tokens: 946,
      success: true
    }
FieldDescription
successIndicates whether the resource was inserted successfully.
tokensNumber of tokens consumed during the operation.
responseResult for the markdown generation