๐ŸŒพ Free API ยท No Credit Card

Crop Classifier API

Identify 50 crop varieties from images using AI. Get your free API key in seconds โ€” no approval needed.

50
Crop Varieties
93.48%
Model Accuracy
Free
Forever
<500ms
Fast Mode Speed

๐Ÿ”‘ Get Your Free API Key

Enter your name and email โ€” your unique key is generated instantly.

Your API key is ready!

Your API Key

๐Ÿ’ป Code Examples

Copy the code for your language and replace YOUR_API_KEY.

// Full analysis (crop name, quality, characteristics, explanation)
const formData = new FormData();
formData.append("file", imageFile); // File from <input type="file">

const response = await fetch("https://vdx-0-crop-classifier-api.hf.space/predict", {
  method: "POST",
  headers: { "x-api-key": "YOUR_API_KEY" },
  body: formData
});

const data = await response.json();

// Use final_answer โ€” has everything you need
console.log(data.final_answer.crop_name);       // "Wheat"
console.log(data.final_answer.quality);         // "Excellent"
console.log(data.final_answer.characteristics); // "Golden stalks..."
console.log(data.final_answer.explanation);     // "Full description..."
import requests

with open("crop.jpg", "rb") as f:
    response = requests.post(
        "https://vdx-0-crop-classifier-api.hf.space/predict",
        headers={"x-api-key": "YOUR_API_KEY"},
        files={"file": f}
    )

data = response.json()
answer = data["final_answer"]

print(answer["crop_name"])       # Wheat
print(answer["quality"])         # Excellent
print(answer["characteristics"]) # Golden stalks...
print(answer["explanation"])     # Full description...
curl -X POST "https://vdx-0-crop-classifier-api.hf.space/predict" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@/path/to/crop.jpg"

๐Ÿ“ก Endpoints

Base URL: https://vdx-0-crop-classifier-api.hf.space

EndpointDescription
POST /predictFull analysis โ€” model + LLaMA AI expert (~10s)
POST /predict/fastModel only โ€” instant response (<500ms)
POST /registerGenerate a new API key
GET /cropsList all 50 supported crop varieties
GET /docsInteractive Swagger API documentation