Vera Cloud H24

Code Examples

Interaction with NeuralAI API

Discover how to use NeuralAI APIs from within Virtual Servers to integrate AI power into your automated workflows.

JavaScript & Python - Intelligent Simulation

⚡ Intelligent Simulated Execution

The code is **analyzed and executed in simulation mode** with recognition of print, loops, functions, imports and API calls.

JavaScript

1. Hello World

Python

1. Hello World (Python)

JavaScript

2. NeuralAI API Call

Python

2. NeuralAI API Call (Python)

JavaScript

3. Web Scraping

Python

3. Web Scraping (Python)

JavaScript

4. Voice Call - Ti Chiamo Io

Python

4. Voice Call - Ti Chiamo Io (Python)

Python

5. Chart with Matplotlib

💡 Integration Tips

  • • Always use environment variables for API keys
  • • Implement retry logic to handle network timeouts
  • • Monitor logs in the terminal to debug issues
  • • Test automations manually before scheduling them
  • • Use webhooks for asynchronous triggers from external systems

Instructions for AI Assistants

An AI assistant can generate working code for NeuralAI Virtual Servers (Cloud Run) by following these rules:

  1. 1Scrivi codice Python o JavaScript puro, eseguibile su Cloud Run (no shebang, no main guard necessaria)
  2. 2Usa solo librerie pre-installate: pandas, numpy, matplotlib, requests, beautifulsoup4, httpx, openpyxl (Python); fetch, fs nativo (JS)
  3. 3Per leggere i file del server usa SERVER_FILES.get("nome.ext", "") — mai open() diretto per file del File Manager
  4. 4Per salvare output nel File Manager usa i marker ===SAVE_FILE:nome=== / ===END_FILE=== (testo) o ===SAVE_IMAGE_URL:nome:url=== (immagini)
  5. 5Per chiamare le API NeuralAI dal codice usa requests.post su https://app.neuralaiweb.com/functions/neuralaiPublicApi con api_key nel body
  6. 6Tutto ciò che viene stampato (print/console.log) appare nell'output del terminale. Gestisci gli errori con try/except e stampa messaggi chiari

Note: to develop custom apps with GUI interface (configurable parameters, automatic form) consult the guide .