The PlantCare Enterprise interface relies on an OpenAPI (Swagger) design allowing businesses to directly ingest our highly accurate predictive modeling engine.
Explore the Interactive Swagger UI#
The full documentation and testing suite is available via our standard endpoints.
- You can access the Unified API Definition at:
https://api.plantcare.farm/v1/swagger.yaml
- Use the Version 1 (Standardized) endpoints:
/v1/analyses/sync, /v1/history, /v1/stats, and the /v1/iot/devices suite.
Security & Compliance#
Our API is built for high-security environments. Learn more about our Zero Trust Security & Authorization model.
Image Optimization#
To provide the best performance and reduce bandwidth, our Enterprise API automatically optimizes all incoming images:
- Format: All images are converted to WebP (Quality 92).
- Resolution: Resized to a maximum of 1024×1024 px while maintaining aspect ratio.
- Privacy: All processing happens within our secure, private network and is protected by OIDC identity tokens.
B2B Workflow#
sequenceDiagram
participant Client as "Enterprise / Mobile Client"
participant API as "API Gateway"
participant GCS as "Cloud Storage"
participant Scan as "Malware Scanner"
participant Proc as "Image Processor"
participant AI as "AI Engine"
Client->>API: "POST /v1/analyses/sync (x-api-key)"
Note over API: "Auto-detect input method"
API->>GCS: "Upload Raw Image (if Base64)"
Note over GCS,Scan: "GCS Trigger: scanNewFile"
Scan->>Scan: "Scan Image for Malware"
API->>Proc: "Request Optimization (OIDC Auth)"
Proc-->>API: "Optimized Image URL"
API->>AI: "Analyze with WebP Image + Language"
AI-->>API: "Analysis Results"
API-->>Client: "JSON Result (Diagnosis + WebP Path)"
Quickstart#
curl -X POST https://api.plantcare.farm/v1/analyses/sync \
-H "x-api-key: pk_ent_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"imageBase64": "...",
"sunExposure": "Full Sun",
"latitude": 40.7128,
"longitude": -74.0060,
"placement": "outside",
"language": "en"
}'
Enterprise Architecture#
Learn more about our Security Middleware, Scalability, and Event-Driven Webhooks in the Architecture & Scalability section.
If you require access to an Enterprise account, please reach out to our global sales team.
The PlantCare Enterprise API implements a Zero Trust security model. Every request is authenticated at multiple layers to ensure data integrity and privacy.
1. Client-to-API Authorization (API Keys) Clients authenticate with a permanent pk_ent_ key provided during onboarding. This key is validated by the Google Cloud API Gateway.
sequenceDiagram participant Client participant GW as "API Gateway" participant KV as "Secret Manager" participant API as "Backend Service" Client->>GW: "Request with Bearer pk_ent_..." GW->>KV: "Validate Key & Permissions" alt "Valid Key" GW->>API: "Proxy Request + Identity Headers" else "Invalid Key" GW-->>Client: "401 Unauthorized" end 2. Storage Security (Malware Scanning) Every image uploaded to the Enterprise API is automatically scanned for viruses and malware before it is processed. This is handled by an asynchronous Cloud Storage Trigger.
...
The PlantCare Enterprise API is built on a Cloud-Native, Stateless architecture designed to handle massive IoT workloads with zero downtime.
1. Edge Security & Metering Every request to our Enterprise endpoints is intercepted by a high-performance Security Middleware that enforces security policies and usage quotas at the edge before any business logic is executed.
sequenceDiagram participant Client participant Edge as "Security Middleware" participant DB as "Quota/Audit Store" participant API as "Analyze Service" Client->>Edge: "Request (with API Token)" Edge->>Edge: "Validate Payload Size (<10MB)" Edge->>Edge: "Verify Token Format (API2)" Edge->>DB: "Check Quota & Role (RBAC)" alt "Quota Exceeded" Edge-->>Client: "429 Too Many Requests" else "Authorized" Edge->>DB: "Log Audit Trail" Edge->>API: "Forward Request" API-->>Client: "Analysis Result" end 2. Reliable Webhook Delivery Our webhook system is decoupled from the main request lifecycle using Google Cloud Pub/Sub. This ensures that even if your endpoint is temporarily down, we will retry delivery with exponential backoff.
...