Guides
Tutorials
Plant Care With AI

Plant Care With AI

Difficulty Level

Beginner

Nodes

Text LLM

Tags

Content
💡

Try out this flow yourself at Lamatic.ai. Sign up for free and start building your own AI workflows.

Add to Lamatic

This guide will help you build an AI-powered plant identification system. The system processes image links provided by users, identifies plants in the images, and generates a structured output. Each identified plant includes its name, care instructions, and key details, providing a seamless way to analyze and extract meaningful data from images.

What You'll Build

A simple API that processes image links provided by users, identifies plants in the images, and generates a structured output. Each identified plant includes its name, care instructions, and essential details. This API enables seamless extraction of meaningful data from images, ensuring efficient and accurate plant identification for a wide range of applications.

Getting Started

1. Project Setup

  1. Sign up at Lamatic.ai (opens in a new tab) and log in.
  2. Navigate to the Projects and click New Project or select your desired project.
  3. You'll see different sections like Flows, Context, and Connections flow.png

2. Creating a New Flow

  1. Navigate to Flows, select New Flow.
  2. Click Create from scratch as starting point. Flow selection

3. Setting Up Your API

  1. Click "Choose a Trigger"
  2. Select "API Request" under the interface options Flow API
  3. Configure your API:
    • Add your Input Schema
    • Set url as parameter in input schema
    • Set response type to "Real-time" Flow API Schema
    • Click on save

4. Adding AI Text Generation

  1. Click the + icon to add a new node

  2. Choose "Generate Text" Node Text Gen

  3. Configure the AI model:

    • Select your "Gemini" credentials
    • Choose "gemini-1.5-pro-latest" as your Model
  4. Under prompts section click the + icon to add prompt

  5. Set up your prompt:

    Analyze the plant image provided at the URL:{{triggerNode_1.output.url}} and generate a strictly formatted JSON response for its care guide.
    
    Instructions:
    Precision: Use exact keys from the structure above. Replace placeholder strings (e.g., "symptom1") with actual data.
    Completeness: Include all sections even if some fields are "N/A".
    Validation: Ensure valid JSON syntax (escape quotes, avoid trailing commas).
    Clarity: Prioritize concise, actionable advice for beginners.
    Ambiguity Handling: If species is unclear, populate the "error" field with a request for more details (e.g., leaf shape, flower color).
    
  • You can add variables using the "insert Variable" button

5. Configuring the reponse

  1. Click the API response node Flow Deploy
  2. Add Output Variables by clicking the + icon
  3. Select variable from your Generate Text Node

7. Test the flow

  1. Click on 'API Request' trigger node
  2. Click on Configure test Flow Deploy
  3. Fill sample value in 'url' and click on test

8. Deployment

  1. Click the Deploy button Flow Deploy
  2. Your API is now ready to be integrated into Node.js or Python applications
  3. Your flow will run on Lamatic's global edge network for fast, scalable performance

9. What's Next?

  • Experiment with different prompts
  • Try other AI models
  • Add more processing steps to your flow
  • Integrate the API into your applications

10. Tips

  • Save your tests for reuse across different scenarios
  • Use consistent JSON structures for better maintainability
  • Test thoroughly before deployment

Now you have a working AI-powered API! You can expand on this foundation to build more complex applications using Lamatic.ai's features.

Was this page useful?

Questions? We're here to help

Subscribe to updates