Smart Control,
Endless Possibilities

Connect to the Tuya smart home ecosystem via REST API, AI Agent Skill, or CLI A single API Key unlocks 3,000+ smart hardware categories.

Quick Install CLInpm install -g tuya-smart-control-cli
3,000+
Hardware Categories
Lights, ACs, cameras & more
200+
Countries & Regions
Global coverage, local data
7
Data Centers
CN/US/EU/IN/UE/WE/SG
1
API Key to Start
Simple auth, auto region detect
3 Integration Methods

Flexible Integration, Minimal Setup

Whether you're building AI apps, scripting automations, or managing devices from the terminal — there's a perfect fit for you.

REST API

Open REST API

Standard HTTP interface callable from any language. Bearer Token auth, auto region detection, full support for home management, device control, weather, and notifications.

  • Bearer Token Auth
  • Auto Region Detection
  • Unified Response Format
  • Python SDK Included
AI Agent Skill

AI Agent Skill

A skill plugin designed for AI agents — install directly into Claude, GPT, and others to control smart home devices via natural language.

  • OpenClaw / ClawHub Support
  • 11 Built-in Workflows
  • Natural Language Control
  • MIT-0 License
CLI Tool

Command Line Tool

Official Node.js CLI — install via npm and manage smart home devices from your terminal. Supports --json output for scripting and CI/CD pipelines.

  • tuya init Quick Setup
  • Device Query & Control
  • Real-time Event Subscribe
  • --json Pipe Output
Code Examples

A Few Lines, Full Control

Choose between Python SDK or CLI — both get you there

from tuya_api import TuyaAPI

api = TuyaAPI()  # auto-reads TUYA_API_KEY

# List all devices
devices = api.get_all_devices()

# Query device Thing Model
model = api.get_device_model("device_id")

# Turn on light, set brightness 500
api.issue_properties("device_id", {
    "switch_led": True,
    "bright_value": 500,
    "work_mode": "white"
})

# Get weather (Beijing)
weather = api.get_weather(
    lat="39.9042", lon="116.4074"
)
Full Coverage

Full Scenario Coverage, Ready to Use

From device queries to real-time subscriptions, from notifications to IPC capture — full smart home control coverage.

Home & Space Management

Query all homes, rooms, and geo-location for weather. Supports multi-home, multi-room hierarchical structure.

GET /homes/allGET /homes/{id}/rooms

Device Query & Control

Get device lists and live status, query Thing Models (with property types and value ranges), issue control commands for bool/value/enum/string properties.

GET /devices/allGET /devices/{id}/detailPOST /shadow/properties/issue

Weather Service

Get real-time and up to 7-hour hourly forecasts by lat/lon. Supports temperature, humidity, pressure, wind speed, UV index, and more.

GET /services/weather/recent

Message Notifications

Send SMS, voice calls, emails, and App push notifications to the current user. Designed for device alerts and anomaly warnings.

POST /sms/self-sendPOST /voice/self-sendPOST /mail/self-sendPOST /push/self-send

Data Statistics

Query device energy usage and other metrics. Supports hourly SUM/MAX/MIN aggregation with a maximum 24-hour window per request.

GET /statistics/hour/configGET /statistics/hour/data

IPC Cloud Capture

Trigger cloud snapshots and short video recordings from cameras. Combine with AI vision for security and monitoring use cases.

POST /ipc/{id}/capture/allocatePOST /ipc/{id}/capture/resolve

Real-time Device Events (WebSocket)

Receive device property changes and online/offline events in real time via WebSocket. Event-driven automation, live dashboards, anomaly alerts. 7 data center endpoints, auto-detected from API key prefix, with auto-reconnect.

wss://wsmsgs.tuyacn.com

One API Key,
Connect Everything

Get your API Key now and start building smart home applications via REST API, AI Agent Skill, or CLI.

Resources

Docs, open-source repositories and the developer platform